Color names for variations of gray color

This forum is a working group for community contributors to the LiveCode IDE included in the main LiveCode distribution.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Color names for variations of gray color

Postby [-hh] » Sun Sep 08, 2013 12:34 am

Last edited by [-hh] on Wed Aug 13, 2014 12:18 pm, edited 1 time in total.
shiftLock happens
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Livecode Membership
Posts: 1487
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Color names for variations of gray color

Postby Mark » Sun Sep 08, 2013 11:57 am


It is correct that many shades of gray are the same, but you are right that gray1 and gray17 should be rather different. The colour names that you find in LiveCode are X11 color names. The names can't be changed, but apparently the colours they refer to in LiveCode are sometimes incorrect.You can read more about X11 colours, particularly shades of gray, on Wikipedia. It should be easy to correct this:

Code: Select all
setProperty x11Gray[theColorProperty] theName
  repeat while the last char of theName is a number
    put the last char of theName before theNum
    delete the last char of theName
  end if
  put theNum*255/100 into myColorItem
  put "set" && theColorProperty && "of the target to" && myColorItem,myColorItem,myColorItem into myScript
  do myScript
end setPropety


Code: Select all
set the x11Gray["backColor"] of grc 1 to gray10

Kind regards,

The biggest LiveCode group on Facebook:
The book "Programming LiveCode for the Real Beginner"! Get it here!
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5118
Joined: Thu Feb 23, 2006 9:24 pm

Return to IDE Contributors

Who is online

Users browsing this forum: No registered users and 1 guest