Color.st
changeset 8171 17c30710ed4a
parent 8165 dec0d9176839
child 8243 c16d146a30e1
equal deleted inserted replaced
8170:baac5c2583e6 8171:17c30710ed4a
  6066         colorId == 0 ifTrue:[^ 0].
  6066         colorId == 0 ifTrue:[^ 0].
  6067         ^ 1
  6067         ^ 1
  6068     ].
  6068     ].
  6069     ^ ((3 * red) + (6 * green) + (blue)) / 10.0 / MaxValue
  6069     ^ ((3 * red) + (6 * green) + (blue)) / 10.0 / MaxValue
  6070 
  6070 
  6071     "Modified: 7.6.1996 / 19:42:21 / cg"
  6071     "
       
  6072      Color black brightness -> 0.0
       
  6073      Color white brightness -> 1.0
       
  6074      Color red brightness   -> 0.3
       
  6075      Color green brightness -> 0.6
       
  6076      Color blue brightness  -> 0.1
       
  6077     "
       
  6078 
       
  6079     "Modified: / 07-06-1996 / 19:42:21 / cg"
       
  6080     "Modified (comment): / 10-09-2017 / 12:02:29 / cg"
  6072 !
  6081 !
  6073 
  6082 
  6074 deltaFrom:aColor
  6083 deltaFrom:aColor
  6075     "return the distance of the receiver from some color specified
  6084     "return the distance of the receiver from some color specified
  6076      by r/g/b values.
  6085      by r/g/b values.