Android - RGB

pawbuj
Posts: 34
Joined: Mon Apr 27, 2020 8:39 am

Post

jak tworzymy skrypty do tego (warunki, definicje)

na wzór jn ?

Code: Select all

function KonwertujRGBnaHSV(RGB : TRGB) : THSV;
var
  temp : integer;
begin
  temp := MIN(MIN(RGB.red, RGB.green), RGB.blue);

  // Obliczanie składowej Value
  Result.value := MAX(MAX(RGB.red, RGB.green), RGB.blue);

  // Zmienna TEMP jest teraz najmniejszą składową, a zmienna Result.value największą składową

  // Obliczanie składowej HUE
  if temp = Result.value then
    Result.hue := 0
  else begin
    if RGB.red=Result.value then
      Result.hue := 0 + ((RGB.green-RGB.blue)*60 div (Result.value-temp));
    if RGB.green=Result.value then
      Result.hue := 120 + ((RGB.blue-RGB.red)*60 div (Result.value-temp));
    if RGB.blue=Result.value then
      Result.hue := 240 + ((RGB.red-RGB.green)*60 div (Result.value-temp));
  end;

  if Result.hue<0 then
    Result.hue := Result.hue+360;

  // Obliczanie składowej SATURATION
  if (Result.value=0) then
    Result.saturation := 0
  else
    Result.saturation := (Result.value-temp)*100 div Result.value;

  // Obliczanie składowej VALUE
  Result.value := (100*Result.value) div 255;
end;
hanuer
Posts: 79
Joined: Tue Jan 07, 2020 1:10 am

Post

Czy przewidziana jest opcja jakiegoś automatycznego przenikania koloru? Coś bardziej złożonego niż tylko włącz/wyłącz kolor.
User avatar
klew
Posts: 13905
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław
Has thanked: 134 times
Been thanked: 137 times

Post

hanuer wrote: Mon Nov 16, 2020 6:56 pm Czy przewidziana jest opcja jakiegoś automatycznego przenikania koloru? Coś bardziej złożonego niż tylko włącz/wyłącz kolor.
Co to jest "automatyczne przenikanie koloru"?
Najlepsze suple dla Twojego domu :mrgreen:
hanuer
Posts: 79
Joined: Tue Jan 07, 2020 1:10 am

Post

Coś jak w tym filmie od 30sek.
https://youtu.be/AV0Q_HMCl2w
User avatar
klew
Posts: 13905
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław
Has thanked: 134 times
Been thanked: 137 times

Post

hanuer wrote: Sun Dec 06, 2020 11:49 pm Coś jak w tym filmie od 30sek.
https://youtu.be/AV0Q_HMCl2w
Jeśli chodzi o płynne przejście między kolorami i jakością, to w SuplaDevice jest to zrobione
Najlepsze suple dla Twojego domu :mrgreen:

Return to “Nowości”