Chris,

In my experience, if you're trying to dynamically brighten a color, but stay in 
the same color value, the simplest way is to add multiples of 65793 (this is 
256^2 + 256^1 + 256^0, or 256*256 + 256 + 001).  On my wimpy-graphics
machine, the difference isn't noticeable until I add (or subtract) increments 
of 5 * 65793, but on a better video platform, this may not be so.

For example, if your backcolor value is currently RGB(150, 100, 150 ), which 
translates to a numeric value of 9856150, or 150*256*256 + 100*256 + 150, and 
you add 328965, which is 5 * 65793, or 5 * (256*256 + 256 + 1), then you
should see the backcolor brighten slightly, but visibly.

Caveat:  the max value is RGB(255,255,255), which is numerically 16777215.  If 
you set a color value higher than this, you'll get an error.

Hope that helps,

Joe

Chris Davis wrote:

> Hi All,
>
> Could anyone suggest a way of working out a brigter version of a colour.  I
> use RGB(x,x,x) to set a colour to say Blue,Pink,Red or whatever and would
> like to be able to work out from whatever colour it is a brighter version.
> So I'm after bright blue,bright pink,bright red in order to highlight the
> blue,pink or red line I'm on.
>
> Sorry for the rubbish explanation.
>
> Cheers
>
> Chris.
>
> P.s. I don't want a pre defined list of colours and their brighter versions.
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to