gettingstarted
[Top] [All Lists]

Re: Colour

To: <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Colour
From: Lars Jensen <larsjensen at rcn dot com>
Date: Wed, 29 Dec 2004 13:51:04 -0500
Delivered-to: gettingstarted at lists dot realsoftware dot com
> Is it possible to convert between &c000000 and RGB() or between Color and
> Integer variables?

Possible and easy. For example, this code:

  dim c as color = &c102030
  dim red as integer = c.Red
  dim green as integer = c.Green
  dim blue as integer = c.Blue
  
  msgbox "red = " + str(red) _
      + EndOfLine + "green = " + str(green)  _
      + EndOfLine + "blue = " + str(blue)

will produce a dialog with this text:

  red = 16
  green = 32
  blue = 48

HSV and CMY color components are equally accessible; see the Color data type
in the online language reference for more info.

lj

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>
  • Colour, Bernard Sunderland
    • Re: Colour, Lars Jensen <=