Recent

Author Topic: Where is GraphUtils? ColorToHLS?  (Read 878 times)

Username

  • New Member
  • *
  • Posts: 30
Where is GraphUtils? ColorToHLS?
« on: May 26, 2022, 04:01:08 am »
Hi,
I want to have user settable color for a Panel that contains some controls and text, and I want to lighten the text if need be, based on the luminance value of the color so it is always easily seen.

I came across a couple posts, one of which refers to GraphUtils (ColorToHLS, RGBToHLS, HLSToColor, HLSToRGB) and it seems that what I want is ColorToHLS(), but I can find little to no information on it, and I can't find GraphUtil in the Laz IDE online package Manager at all.
 
Does it still exist? If so, how can I find it please?
TIA
« Last Edit: May 26, 2022, 04:22:05 am by Username »

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: Where is GraphUtils? ColorToHLS?
« Reply #1 on: May 26, 2022, 04:42:13 am »
... I can't find GraphUtil in the Laz IDE online package Manager at all.

You just need to put GraphUtil in the uses clause, it is provided by LCL.

Username

  • New Member
  • *
  • Posts: 30
Re: Where is GraphUtils? ColorToHLS?
« Reply #2 on: May 26, 2022, 04:48:39 am »
... I can't find GraphUtil in the Laz IDE online package Manager at all.

You just need to put GraphUtil in the uses clause, it is provided by LCL.
Thanks Handoko! It was just misspelled! Had uses GraphUtils not GraphUtil.

wp

  • Hero Member
  • *****
  • Posts: 11855
Re: Where is GraphUtils? ColorToHLS?
« Reply #3 on: May 26, 2022, 09:45:31 am »
I have the same issue with these XXXUtil(s) units from time to time. My solution: Type the unit name without "s" first, move the mouse over it and press the CTRL key. When the unit name becomes blue and underlined the IDE found it. Otherwise add the "s", and try again with the mouse.

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: Where is GraphUtils? ColorToHLS?
« Reply #4 on: May 26, 2022, 09:54:29 am »
I have the same issue with these XXXUtil(s) units from time to time. My solution: Type the unit name without "s" first, move the mouse over it and press the CTRL key. When the unit name becomes blue and underlined the IDE found it. Otherwise add the "s", and try again with the mouse.
Funny, never knew that about the CTRL+mouse.
I always use Alt + Up key. If the unit exists, it'll open up (CTRL+F4 to close it fast), otherwise you get an message in the message-pane.

Both also work for classes etc.

(Ctrl+Enter should also work for files/units)

 

TinyPortal © 2005-2018