mbColorLib: Remove LColorPicker and VColorPicker from lib (are replaced by LVColorPicker). Remove two forgotten Delphi dfm files.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5597 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-01-05 22:25:03 +00:00
parent b24e7d5d2c
commit 2f0b4db1c9
13 changed files with 285 additions and 1061 deletions

View File

@@ -603,14 +603,14 @@ object Form1: TForm1
end
object TabSheet4: TTabSheet
Caption = 'HSLRingPicker'
ClientHeight = 365
ClientWidth = 420
ClientHeight = 376
ClientWidth = 468
ImageIndex = 3
object HSLRingPicker1: THSLRingPicker
Left = 50
Height = 351
Height = 362
Top = 6
Width = 322
Width = 370
Luminance = 240
RingPickerHintFormat = 'Hue: %h'
SLPickerHintFormat = 'S: %hslS V: %v'#13'Hex: %hex'
@@ -637,6 +637,7 @@ object Form1: TForm1
HintFormat = 'H: %h S: %s V: %v'#13'Hex: %hex'
Anchors = [akTop, akLeft, akRight, akBottom]
TabOrder = 0
Luminance = 128
Saturation = 0
OnChange = HSVColorPicker1Change
end
@@ -691,7 +692,7 @@ object Form1: TForm1
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Button5
Left = 238
Height = 339
Height = 347
Top = 0
Width = 230
Anchors = [akTop, akLeft, akRight, akBottom]
@@ -703,7 +704,7 @@ object Form1: TForm1
AnchorSideRight.Control = Bevel1
AnchorSideBottom.Control = Button5
Left = 0
Height = 339
Height = 347
Top = 0
Width = 230
InfoLabelText = 'Color Values:'
@@ -783,7 +784,7 @@ object Form1: TForm1
OnClick = OfficeColorDialogButtonClick
TabOrder = 1
end
object LColorPicker1: TLColorPicker
object LVColorPicker2: TLVColorPicker
Left = 34
Height = 25
Top = 265
@@ -792,12 +793,12 @@ object Form1: TForm1
SelectionIndicator = siRect
Anchors = [akLeft, akRight, akBottom]
TabOrder = 2
Hue = 0
Saturation = 240
Luminance = 120
HintFormat = 'Luminance: %l (selected)'
Saturation = 240
LHintFormat = 'Luminance: %l (selected)'
VHintFormat = 'Value: %v (selected)'
end
object VColorPicker1: TVColorPicker
object LVColorPicker3: TLVColorPicker
Left = 34
Height = 21
Top = 233
@@ -807,10 +808,9 @@ object Form1: TForm1
SelectionIndicator = siRect
Anchors = [akLeft, akRight, akBottom]
TabOrder = 3
Hue = 0
Saturation = 255
Value = 255
HintFormat = 'Value: %v (selected)'
LHintFormat = 'Luminance: %l (selected)'
VHintFormat = 'Value: %v (selected)'
end
object HColorPicker1: THColorPicker
Left = 34

View File

@@ -8,14 +8,13 @@ uses
Dialogs, HSLColorPicker, ComCtrls, StdCtrls, ExtCtrls, mbColorPreview,
HexaColorPicker, mbColorPalette, HSLRingPicker, HSVColorPicker, PalUtils,
SLHColorPicker, mbDeskPickerButton, mbOfficeColorDialog, SColorPicker,
HColorPicker, LVColorPicker, mbTrackBarPicker, LColorPicker, HRingPicker,
SLColorPicker, HSColorPicker, IniFiles, mbColorPickerControl, BColorPicker,
GColorPicker, RColorPicker, KColorPicker, YColorPicker, MColorPicker,
CColorPicker, CIEBColorPicker, CIEAColorPicker, Typinfo, CIELColorPicker,
BAxisColorPicker, GAxisColorPicker, RAxisColorPicker, mbColorTree,
mbColorList, mbBasicPicker,
HColorPicker, LVColorPicker, mbTrackBarPicker, HRingPicker, SLColorPicker,
HSColorPicker, IniFiles, mbColorPickerControl, BColorPicker, GColorPicker,
RColorPicker, KColorPicker, YColorPicker, MColorPicker, CColorPicker,
CIEBColorPicker, CIEAColorPicker, Typinfo, CIELColorPicker, BAxisColorPicker,
GAxisColorPicker, RAxisColorPicker, mbColorTree, mbColorList;
VColorPicker;
{ vmbColorList, mbBasicPicker, }
type
@@ -58,8 +57,8 @@ type
mbDeskPickerButton1: TmbDeskPickerButton;
mbOfficeColorDialog1: TmbOfficeColorDialog;
OfficeColorDialogButton: TButton;
LColorPicker1: TLColorPicker;
VColorPicker1: TVColorPicker;
LVColorPicker2: TLVColorPicker;
LVColorPicker3: TLVColorPicker;
HColorPicker1: THColorPicker;
SColorPicker1: TSColorPicker;
HSColorPicker1: THSColorPicker;
@@ -426,7 +425,7 @@ begin
else if PageControl1.ActivePage = Tabsheet5 then
begin
HSVColorPicker1.Enabled := CbEnabled.Checked;
VColorPicker1.Enabled := CbEnabled.Checked;
LVColorPicker1.Enabled := CbEnabled.Checked;
end
else if PageControl1.ActivePage = Tabsheet6 then
SLHColorPicker1.Enabled := CbEnabled.Checked
@@ -439,8 +438,8 @@ begin
begin
mbDeskPickerButton1.Enabled := CbEnabled.Checked;
OfficeColorDialogButton.Enabled := CbEnabled.Checked;
LColorPicker1.Enabled := CbEnabled.Checked;
VColorPicker1.Enabled := CbEnabled.Checked;
LVColorPicker2.Enabled := CbEnabled.Checked;
LVColorPicker3.Enabled := CbEnabled.Checked;
HColorPicker1.Enabled := CbEnabled.Checked;
SColorPicker1.Enabled := CbEnabled.Checked;
end

View File

@@ -14,10 +14,10 @@ object Form1: TForm1
Height = 429
Top = 0
Width = 400
ActivePage = tabVertical
ActivePage = tabHorizontal
Align = alClient
Anchors = [akTop, akRight]
TabIndex = 0
TabIndex = 1
TabOrder = 0
object tabVertical: TTabSheet
Caption = 'vertical'
@@ -177,37 +177,20 @@ object Form1: TForm1
Caption = 'R'
ParentColor = False
end
object VColorPickerV: TVColorPicker
AnchorSideTop.Control = HColorPickerV
Left = 368
Height = 279
Top = 23
Width = 22
HintFormat = 'Value: %value'
Layout = lyVertical
Visible = False
TabOrder = 5
OnChange = SLVPickerV_Change
Hue = 0
Saturation = 0
Value = 255
SelectedColor = clWhite
end
object LColorPickerV: TLColorPicker
object LVColorPickerV: TLVColorPicker
AnchorSideTop.Control = HColorPickerV
Left = 350
Height = 279
Top = 23
Width = 22
HintFormat = 'Luminance: %value'
SelectedColor = 14869218
Layout = lyVertical
Anchors = [akTop, akLeft, akBottom]
TabOrder = 6
TabOrder = 5
OnChange = SLVPickerV_Change
Hue = 0
Saturation = 0
Luminance = 226
SelectedColor = 14869218
LHintFormat = 'Luminance: %l'
VHintFormat = 'Value: %v'
end
object HColorPickerV: THColorPicker
AnchorSideTop.Control = LblH
@@ -216,14 +199,12 @@ object Form1: TForm1
Height = 279
Top = 23
Width = 22
HintFormat = 'Hue: %value'
Layout = lyVertical
Anchors = [akTop, akLeft, akBottom]
TabOrder = 7
TabOrder = 6
OnChange = HPickerV_Change
Hue = 0
Saturation = 255
Value = 255
Luminance = 128
HintFormat = 'Hue: %value'
end
object KColorPickerV: TKColorPicker
AnchorSideTop.Control = CColorPickerV
@@ -231,13 +212,13 @@ object Form1: TForm1
Height = 297
Top = 23
Width = 22
HintFormat = 'Black: %value'
SelectedColor = 16711422
Anchors = [akTop, akLeft, akBottom]
TabOrder = 8
TabOrder = 7
OnChange = CMYKPickerV_Change
Cyan = 0
Black = 1
SelectedColor = 16711422
HintFormat = 'Black: %value'
end
object YColorPickerV: TYColorPicker
AnchorSideTop.Control = CColorPickerV
@@ -245,11 +226,11 @@ object Form1: TForm1
Height = 297
Top = 23
Width = 22
HintFormat = 'Yellow: %value'
Anchors = [akTop, akLeft, akBottom]
TabOrder = 9
OnChange = CMYKPickerV_Change
SelectedColor = clYellow
Anchors = [akTop, akLeft, akBottom]
TabOrder = 8
OnChange = CMYKPickerV_Change
HintFormat = 'Yellow: %value'
end
object MColorPickerV: TMColorPicker
AnchorSideTop.Control = CColorPickerV
@@ -257,11 +238,11 @@ object Form1: TForm1
Height = 297
Top = 23
Width = 22
HintFormat = 'Magenta: %value'
Anchors = [akTop, akLeft, akBottom]
TabOrder = 10
OnChange = CMYKPickerV_Change
SelectedColor = clFuchsia
Anchors = [akTop, akLeft, akBottom]
TabOrder = 9
OnChange = CMYKPickerV_Change
HintFormat = 'Magenta: %value'
end
object CColorPickerV: TCColorPicker
AnchorSideTop.Control = LblC
@@ -270,11 +251,11 @@ object Form1: TForm1
Height = 297
Top = 23
Width = 22
HintFormat = 'Cyan: %value'
Anchors = [akTop, akLeft, akBottom]
TabOrder = 11
OnChange = CMYKPickerV_Change
SelectedColor = clAqua
Anchors = [akTop, akLeft, akBottom]
TabOrder = 10
OnChange = CMYKPickerV_Change
HintFormat = 'Cyan: %value'
end
object RColorPickerV: TRColorPicker
AnchorSideTop.Control = LblR
@@ -283,12 +264,12 @@ object Form1: TForm1
Height = 297
Top = 23
Width = 22
HintFormat = 'Red: %value'
Anchors = [akTop, akLeft, akBottom]
TabOrder = 12
TabOrder = 11
OnChange = RGBPickerV_Change
Green = 0
Blue = 0
HintFormat = 'Red: %value'
end
object GColorPickerV: TGColorPicker
AnchorSideTop.Control = RColorPickerV
@@ -296,13 +277,13 @@ object Form1: TForm1
Height = 297
Top = 23
Width = 22
HintFormat = 'Green: %value'
SelectedColor = clLime
Anchors = [akTop, akLeft, akBottom]
TabOrder = 13
TabOrder = 12
OnChange = RGBPickerV_Change
Red = 0
Blue = 0
SelectedColor = clLime
HintFormat = 'Green: %value'
end
object BColorPickerV: TBColorPicker
AnchorSideTop.Control = RColorPickerV
@@ -310,13 +291,13 @@ object Form1: TForm1
Height = 297
Top = 23
Width = 22
HintFormat = 'Blue: %value'
SelectedColor = clBlue
Anchors = [akTop, akLeft, akBottom]
TabOrder = 14
TabOrder = 13
OnChange = RGBPickerV_Change
Green = 0
Red = 0
SelectedColor = clBlue
HintFormat = 'Blue: %value'
end
object SColorPickerV: TSColorPicker
AnchorSideTop.Control = HColorPickerV
@@ -324,14 +305,12 @@ object Form1: TForm1
Height = 279
Top = 23
Width = 22
HintFormat = 'Saturation: %value'
Layout = lyVertical
Anchors = [akTop, akLeft, akBottom]
TabOrder = 15
TabOrder = 14
OnChange = SLVPickerV_Change
Hue = 0
Saturation = 255
Value = 255
Luminance = 128
HintFormat = 'Saturation: %value'
end
end
end
@@ -491,35 +470,19 @@ object Form1: TForm1
Caption = 'R'
ParentColor = False
end
object VColorPickerH: TVColorPicker
Left = 128
Height = 22
Top = 373
Width = 224
BevelInner = bvLowered
HintFormat = 'Value: %value'
Visible = False
TabOrder = 5
OnChange = SLVPickerH_Change
Hue = 0
Saturation = 0
Value = 255
SelectedColor = clWhite
end
object LColorPickerH: TLColorPicker
object LVColorPickerH: TLVColorPicker
Left = 24
Height = 22
Top = 344
Width = 301
BevelInner = bvLowered
HintFormat = 'Luminance: %value'
Anchors = [akTop, akLeft, akRight]
TabOrder = 6
OnChange = SLVPickerH_Change
Hue = 0
Saturation = 0
Luminance = 226
SelectedColor = 14869218
BevelInner = bvLowered
Anchors = [akTop, akLeft, akRight]
TabOrder = 5
OnChange = SLVPickerH_Change
Luminance = 226
LHintFormat = 'Luminance: %l'
VHintFormat = 'Value: %v'
end
object SColorPickerH: TSColorPicker
Left = 24
@@ -527,13 +490,11 @@ object Form1: TForm1
Top = 312
Width = 301
BevelOuter = bvLowered
HintFormat = 'Saturation: %value'
Anchors = [akTop, akLeft, akRight]
TabOrder = 7
TabOrder = 6
OnChange = SLVPickerH_Change
Hue = 0
Saturation = 255
Value = 255
Luminance = 128
HintFormat = 'Saturation: %value'
end
object HColorPickerH: THColorPicker
Left = 24
@@ -541,104 +502,102 @@ object Form1: TForm1
Top = 282
Width = 301
BevelOuter = bvLowered
HintFormat = 'Hue: %value'
Anchors = [akTop, akLeft, akRight]
TabOrder = 8
TabOrder = 7
OnChange = HPickerH_Change
Hue = 0
Saturation = 255
Value = 255
Luminance = 128
HintFormat = 'Hue: %value'
end
object KColorPickerH: TKColorPicker
Left = 24
Height = 22
Top = 224
Width = 301
HintFormat = 'Black: %value'
SelectedColor = 16711422
Layout = lyHorizontal
Anchors = [akTop, akLeft, akRight]
TabOrder = 9
TabOrder = 8
OnChange = CMYKPickerH_Change
Cyan = 0
Black = 1
SelectedColor = 16711422
HintFormat = 'Black: %value'
end
object MColorPickerH: TMColorPicker
Left = 24
Height = 22
Top = 160
Width = 301
HintFormat = 'Magenta: %value'
SelectedColor = clFuchsia
Layout = lyHorizontal
Anchors = [akTop, akLeft, akRight]
TabOrder = 10
TabOrder = 9
OnChange = CMYKPickerH_Change
SelectedColor = clFuchsia
HintFormat = 'Magenta: %value'
end
object YColorPickerH: TYColorPicker
Left = 24
Height = 22
Top = 192
Width = 301
HintFormat = 'Yellow: %value'
SelectedColor = clYellow
Layout = lyHorizontal
Anchors = [akTop, akLeft, akRight]
TabOrder = 11
TabOrder = 10
OnChange = CMYKPickerH_Change
SelectedColor = clYellow
HintFormat = 'Yellow: %value'
end
object CColorPickerH: TCColorPicker
Left = 24
Height = 22
Top = 128
Width = 301
HintFormat = 'Cyan: %value'
SelectedColor = clAqua
Layout = lyHorizontal
Anchors = [akTop, akLeft, akRight]
TabOrder = 12
TabOrder = 11
OnChange = CMYKPickerH_Change
SelectedColor = clAqua
HintFormat = 'Cyan: %value'
end
object BColorPickerH: TBColorPicker
Left = 24
Height = 22
Top = 80
Width = 301
HintFormat = 'Blue: %value'
SelectedColor = clBlue
Layout = lyHorizontal
Anchors = [akTop, akLeft, akRight]
TabOrder = 13
TabOrder = 12
OnChange = RGBPickerH_Change
Green = 0
Red = 0
SelectedColor = clBlue
HintFormat = 'Blue: %value'
end
object GColorPickerH: TGColorPicker
Left = 24
Height = 22
Top = 48
Width = 301
HintFormat = 'Green: %value'
SelectedColor = clLime
Layout = lyHorizontal
Anchors = [akTop, akLeft, akRight]
TabOrder = 14
TabOrder = 13
OnChange = RGBPickerH_Change
Red = 0
Blue = 0
SelectedColor = clLime
HintFormat = 'Green: %value'
end
object RColorPickerH: TRColorPicker
Left = 24
Height = 22
Top = 16
Width = 301
HintFormat = 'Red: %value'
Layout = lyHorizontal
Anchors = [akTop, akLeft, akRight]
TabOrder = 15
TabOrder = 14
OnChange = RGBPickerH_Change
Green = 0
Blue = 0
HintFormat = 'Red: %value'
end
end
end

View File

@@ -8,7 +8,7 @@ uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
StdCtrls, ExtCtrls, BColorPicker, GColorPicker, RColorPicker, CColorPicker,
YColorPicker, MColorPicker, KColorPicker, HColorPicker, SColorPicker,
LColorPicker, VColorPicker, mbColorPreview;
LVColorPicker, mbColorPreview;
type
@@ -49,8 +49,6 @@ type
Label7: TLabel;
LblH: TLabel;
Label9: TLabel;
LColorPickerH: TLColorPicker;
LColorPickerV: TLColorPicker;
CMYKh: TmbColorPreview;
HSLVh: TmbColorPreview;
Panel1: TPanel;
@@ -72,8 +70,8 @@ type
SColorPickerV: TSColorPicker;
tabVertical: TTabSheet;
tabHorizontal: TTabSheet;
VColorPickerH: TVColorPicker;
VColorPickerV: TVColorPicker;
LVColorPickerH: TLVColorPicker;
LVColorPickerV: TLVColorPicker;
YColorPickerH: TYColorPicker;
YColorPickerV: TYColorPicker;
procedure CMYKPickerV_Change(Sender: TObject);
@@ -96,12 +94,18 @@ type
var
Form1: TForm1;
const
MaxHue = 360;
MaxSat = 255;
MaxLum = 255;
MaxVal = 255;
implementation
{$R *.lfm}
uses
LCLType, LCLIntf, ScanLines, RGBCMYKUtils, RGBHSLUtils, RGBHSVUtils;
LCLType, LCLIntf, ScanLines, RGBCMYKUtils, mbColorConv;
{ TForm1 }
@@ -124,8 +128,9 @@ begin
'Cyan: %d - Magenta: %d - Yellow: %d - Black: %d'#13 +
'Hue: %d - Saturation: %d - Luminance: %d - Value: %d', [
GetRValue(c), GetGValue(c), GetBValue(c),
GetCValue(c), GetMValue(c), GetYvalue(c), GetKValue(c),
GetHValue(c), GetSValue(c), GetLValue(c), GetVValue(c)
GetCValue(c), GetMValue(c), GetYValue(c), GetKValue(c),
round(GetRelHValue(c)*MaxHue), round(GetRelSValueHSL(c)*MaxSat),
round(GetRelLValue(c)*MaxLum), round(GetRelVValue(c)*MaxVal)
]);
end;
@@ -149,26 +154,13 @@ begin
'Hue: %d - Saturation: %d - Luminance: %d - Value: %d', [
GetRValue(c), GetGValue(c), GetBValue(c),
GetCValue(c), GetMValue(c), GetYvalue(c), GetKValue(c),
GetHValue(c), GetSValue(c), GetLValue(c), GetVValue(c)
round(GetRelHValue(c)*MaxHue), round(GetRelSValueHSL(c)*MaxSat),
round(GetRelLValue(c)*MaxLum), round(GetRelVValue(c)*MaxVal)
]);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
MaxHue := 359;
MaxSat := 240;
MaxLum := 240;
VColorPickerH.Left := LColorPickerH.Left;
VColorPickerH.Top := LColorPickerH.Top;
VColorPickerH.Width := LColorPickerH.Width;
VColorPickerH.Anchors := [akLeft, akTop, akRight];
VColorPickerV.Left := LColorPickerV.Left;
VColorPickerV.Top := LColorPickerV.Top;
VColorPickerV.Height := LColorPickerV.Height;
VColorPickerV.Anchors := [akLeft, akTop, akBottom];
RGBPickerH_Change(nil);
CMYKPickerH_Change(nil);
SLVPickerH_Change(nil);
@@ -180,20 +172,21 @@ end;
procedure TForm1.HPickerH_Change(Sender: TObject);
begin
exit;
if ComponentState <> [] then
exit;
SLVPickerH_Change(nil);
SColorPickerH.Hue := HColorPickerH.Hue;
LColorPickerH.Hue := HColorPickerH.Hue;
VColorPickerH.Hue := HColorPickerH.Hue;
LVColorPickerH.Hue := HColorPickerH.Hue;
end;
procedure TForm1.HPickerV_Change(Sender: TObject);
begin
if ComponentState <> [] then
exit;
SLVPickerV_Change(nil);
SColorPickerV.Hue := HColorPickerV.Hue;
LColorPickerV.Hue := HColorPickerV.Hue;
VColorPickerV.Hue := HColorPickerV.Hue;
LVColorPickerV.Hue := HColorPickerV.Hue;
end;
procedure TForm1.rbHSLv_Change(Sender: TObject);
@@ -201,14 +194,16 @@ begin
if rbHSLv.Checked then
begin
lblLVv.Caption := 'L';
VColorPickerV.Visible := false;
LColorPickerV.Visible := true;
HColorPickerV.BrightnessMode := bmLuminance;
SColorPickerV.BrightnessMode := bmLuminance;
LVColorPickerV.BrightnessMode := bmLuminance;
end;
if rbHSVv.Checked then
begin
lblLVv.Caption := 'V';
LColorPickerV.Visible := false;
VColorPickerV.Visible := true;
HColorPickerV.BrightnessMode := bmValue;
SColorPickerV.BrightnessMode := bmValue;
LVColorPickerV.BrightnessMode := bmValue;
end;
HPickerV_Change(nil);
end;
@@ -218,14 +213,16 @@ begin
if rbHSLh.Checked then
begin
lblLVh.Caption := 'L';
VColorPickerH.Visible := false;
LColorPickerH.Visible := true;
HColorPickerH.BrightnessMode := bmLuminance;
SColorPickerH.BrightnessMode := bmLuminance;
LVColorPickerH.BrightnessMode := bmLuminance;
end;
if rbHSVh.Checked then
begin
lblLVh.Caption := 'V';
lColorPickerH.Visible := false;
VColorPickerH.Visible := true;
HColorPickerH.BrightnessMode := bmValue;
SColorPickerH.BrightnessMode := bmValue;
LVColorPickerH.BrightnessMode := bmValue;
end;
HPickerH_Change(nil);
end;
@@ -248,7 +245,8 @@ begin
'Hue: %d - Saturation: %d - Luminance: %d - Value: %d', [
GetRValue(c), GetGValue(c), GetBValue(c),
GetCValue(c), GetMValue(c), GetYvalue(c), GetKValue(c),
GetHValue(c), GetSValue(c), GetLValue(c), GetVValue(c)
round(GetRelHValue(c)*MaxHue), round(GetRelSValueHSL(c)*MaxSat),
round(GetRelLValue(c)*MaxLum), round(GetRelVValue(c)*MaxVal)
]);
end;
@@ -270,7 +268,8 @@ begin
'Hue: %d - Saturation: %d - Luminance: %d - Value: %d', [
GetRValue(c), GetGValue(c), GetBValue(c),
GetCValue(c), GetMValue(c), GetYvalue(c), GetKValue(c),
GetHValue(c), GetSValue(c), GetLValue(c), GetVValue(c)
round(GetRelHValue(c)*MaxHue), round(GetRelSValueHSL(c)*MaxSat),
round(GetRelLValue(c)*MaxLum), round(GetRelVValue(c)*MaxVal)
]);
end;
@@ -279,18 +278,16 @@ var
triple: TRGBTriple;
c: TColor;
begin
if (HSLVh = nil) or (HColorPickerH = nil) or (SColorPickerH = nil) then
if (HSLVh = nil) or (HColorPickerH = nil) or (SColorPickerH = nil) or
(LVColorPickerH = nil)
then
exit;
if rbHSLh.Checked then begin
if (LColorPickerH = nil) then
exit;
HSLVh.Color := HSLRangeToRGB(HColorPickerH.Hue, SColorPickerH.Saturation, LColorPickerH.Luminance);
end;
if rbHSVh.Checked then begin
if (VColorPickerH = nil) then
exit;
HSLVh.Color := HSVRangetoColor(HColorPickerH.Hue, SColorPickerH.Saturation, VColorPickerH.Value);
end;
if rbHSLh.Checked then
HSLVh.Color := HSLToColor(HColorPickerH.RelHue, SColorPickerH.RelSaturation, LVColorPickerH.RelLuminance);
if rbHSVh.Checked then
HSLVh.Color := HSVToColor(HColorPickerH.RelHue, SColorPickerH.RelSaturation, LVColorPickerH.RelValue);
c := HSLVh.Color;
HSLVh.Hint := Format('Red: %d - Green: %d - Blue: %d'#13 +
@@ -298,31 +295,31 @@ begin
'Hue: %d - Saturation: %d - Luminance: %d - Value: %d', [
GetRValue(c), GetGValue(c), GetBValue(c),
GetCValue(c), GetMValue(c), GetYvalue(c), GetKValue(c),
GetHValue(c), GetSValue(c), GetLValue(c), GetVValue(c)
round(GetRelHValue(c)*MaxHue), round(GetRelSValueHSL(c)*MaxSat),
round(GetRelLValue(c)*MaxLum), round(GetRelVValue(c)*MaxVal)
]);
end;
procedure TForm1.SLVPickerV_Change(Sender: TObject);
var
triple: TRGBTriple;
c: TColor;
begin
if (HSLVv = nil) or (HColorPickerV = nil) or (SColorPickerV = nil) then
if (HSLVv = nil) or (HColorPickerV = nil) or (SColorPickerV = nil) or
(LVColorPickerV = nil)
then
exit;
if rbHSLv.Checked then begin
if (LColorPickerV = nil) then
if (LVColorPickerV = nil) then
exit;
triple := HSLToRGBTriple(HColorPickerV.Hue, SColorPickerV.Saturation, LColorPickerV.Luminance);
HSLVv.Color := RGBTripleToColor(triple);
c := HSLToColor(HColorPickerV.RelHue, SColorPickerV.RelSaturation, LVColorPickerV.RelLuminance);
HSLVv.Color := c;
end;
if rbHSVv.Checked then begin
if (VColorPickerV = nil) then
if (LVColorPickerV = nil) then
exit;
HSLVv.Color := HSVtoColor(
HColorPickerV.Hue/HColorPickerV.MaxHue,
SColorPickerV.Saturation/SColorPickerV.MaxSaturation,
VColorPickerV.Value/VColorPickerV.MaxValue
);
c := HSVtoColor(HColorPickerV.RelHue, SColorPickerV.RelSaturation, LVColorPickerV.RelValue);
HSLVv.Color := c;
end;
c := HSLVv.Color;
@@ -331,7 +328,8 @@ begin
'Hue: %d - Saturation: %d - Luminance: %d - Value: %d', [
GetRValue(c), GetGValue(c), GetBValue(c),
GetCValue(c), GetMValue(c), GetYvalue(c), GetKValue(c),
GetHValue(c), GetSValue(c), GetLValue(c), GetVValue(c)
round(GetRelHValue(c)*MaxHue), round(GetRelSValueHSL(c)*MaxSat),
round(GetRelLValue(c)*MaxLum), round(GetRelVValue(c)*MaxVal)
]);
end;