"lightening" a color

Scott Rossi scott at tactilemedia.com
Sat Sep 10 21:31:41 EDT 2016

Here's a tint function from way back.  pRGB is an RGB triplet, pValue is a
decimal percent value for the desired tint of the color.

function colorTint pRGB, pValue
   -- pRGB is RGB triplet
   -- pValue is between 0 and 1
   put pRGB into theTint
   repeat with N = 1 to 3
      put item N of pRGB into theColorItem
      put round ((1- pValue) * theColorItem + (pValue * 255)) into item N
of theTint
   end repeat
   return theTint
end colorTint


Scott Rossi
Creative Director
Tactile Media, UX/UI Design

On 9/10/16, 3:00 PM, "use-livecode on behalf of Dr. Hawkins"
<use-livecode-bounces at lists.runrev.com on behalf of dochawk at gmail.com>

>I am adding the ability to have multiple clients open, and want to use
>colors as a cue.
>Is there a way to "lighten" a color.  That is (I suppose), to grab the
>numeric representation, and convert that to a much paler shade of the
>Dr. Richard E. Hawkins, Esq.
>(702) 508-8462
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:

More information about the Use-livecode mailing list