VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Get the seperate RGB values of a Colour

Davy Cook  (2 Submissions)   Custom Controls/Forms/Menus   Visual Basic 3.0   Beginner   Wed 3rd February 2021

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).

Inputs
Input the colour that you wish to turn into its seperate RGB values. This should be in Decimal format.

Assumes
Just make sure to keep the types as Long (&) because using an Integer (%) causes an overflow in the Red Value.

Returns
Returns the Red, Green, and Blue value from a colour.

Side Effects
'None.

API Declarations
'None.

Rate Get the seperate RGB values of a Colour (5(5 Vote))
Get the seperate RGB values of a Colour.bas

Get the seperate RGB values of a Colour Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters