Advertisement
6_2008-2009 Custom Controls/ Forms/ Menus #199453

Get the seperate RGB values of a Colour

It turns the Decimal format of a colour value (example: 16777215) into three seperate values containing the seperate Red, Green, and Blue values. (example: red = 255, green = 255, blue = 255).

AI

Shrnutí AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Zdrojový kód
original-source
Dim blue&, green&, red&, colour&
Blue& = Int(Colour& / 65536)
Green& = Int((Colour& - (65536 * Blue&)) / 256)
Red& = Colour& - (Blue& * 65536) - (Green& * 256)
'to return the colour to its original decimal format
Colour& = RGB(Red&, Green&, Blue&)
Původní komentáře (3)
Obnoveno z Wayback Machine