function trueToRGB, number ;+ ; ;+ ; NAME: ; trueToRGB ; ; PURPOSE: ; Converts a true color number to the r,g,b value ; ; CATEGORY: ; Graphics. ; ; CALLING SEQUENCE: ; rgb = trueToRGB(1234546l) ; ; INPUTS: ; true color number ; ; KEYWORD PARAMETERS: ; None. ; OUTPUTS: ; Three element array of red,green, blue values ; COMMON BLOCKS: ; None. ; SIDE EFFECTS: ; None.. ; RESTRICTIONS: ; None. ; MODIFICATION HISTORY: ; Written 5/6/1999 by Ronn Kling ; Kling Research and Software ; www.rlkling.com ; ; LICENSE ; ; This software is OSI Certified Open Source Software. ; OSI Certified is a certification mark of the Open Source Initiative. ; ; Copyright © 1997-2001 Kling Research and Software. ; ; This software is provided "as-is", without any express or ; implied warranty. In no event will the authors be held liable ; for any damages arising from the use of this software. ; ; Permission is granted to anyone to use this software for any ; purpose, including commercial applications, and to alter it and ; redistribute it freely, subject to the following restrictions: ; ; 1. The origin of this software must not be misrepresented; you must ; not claim you wrote the original software. If you use this software ; in a product, an acknowledgment in the product documentation ; would be appreciated, but is not required. ; ; 2. Altered source versions must be plainly marked as such, and must ; not be misrepresented as being the original software. ; ; 3. This notice may not be removed or altered from any source distribution. ; ; For more information on Open Source Software, visit the Open Source ; web site: http://www.opensource.org. ;- if number gt 2l^24 then message,'Color number is too large!' blue = long(number/65536l) green = long( (number - (blue * 65536l))/256l) red = long( number - (blue * 65536l) - (green * 256l)) return, byte([red,green,blue]) end