Converting Rev color to HTML color?

Chipp Walters chipp at chipp.com
Sat Nov 30 02:51:01 EST 2002


Dave, you can use the following to craft your own function:
I use the following: (a mouseMove handler in the stack script)

on mouseMove
  put the mouseColor into thecolor
  set the numberFormat to "##"
  put formathex(baseConvert(item 1 of thecolor,10,16)) into R
  put formathex(baseConvert(item 2 of thecolor,10,16)) into G
  put formathex(baseConvert(item 3 of thecolor,10,16)) into B
  put thecolor into cd fld 1
end mouseMove

function formathex thevalue
  if the length of thevalue is 1
  then put "0" before thevalue
  return thevalue
end formathex

_______________________________________________
improve-revolution mailing list
improve-revolution at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/improve-revolution

> -----Original Message-----
> From: use-revolution-admin at lists.runrev.com
> [mailto:use-revolution-admin at lists.runrev.com]On Behalf Of David Egbert
> Sent: Saturday, November 30, 2002 1:07 AM
> To: use-revolution at lists.runrev.com
> Subject: Converting Rev color to HTML color?
>
>
> I'm trying to convert the color returned from Answer Color to a HTML-style
> color.  Is there a function that will do that?  I tried using
> "answer color
> with #FFFFFF" in hopes it would return HTML color, but that didn't work.
>
> Any ideas?
>
> Many thanks to this wonderful group in helping me get up to speed
> with Rev!
>
>
> --
> Dave Egbert
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list