Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-09

TColor($RRGGBB) -> TColor($BBGGRR)

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I can do the following myself with a simple function, but does LCL already contain a function that swaps the Red and Blue channel values?

I have many color values defined in RRGGBB format (eg: PDF colors, HTML colors, fpGUI colors etc), but need to convert it to a compatible LCL TColor where the format is BBGGRR.

Regards,
Graeme

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys
Graeme Geldenhuys wrote
I can do the following myself with a simple function, but does LCL already contain a function that swaps the Red and Blue channel values?

I searched all of Graphics and GraphUtils and couldn't find anything revelant, so I created a simple RGBtoBGR() function.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email