Yes :)
And we want to have this inside Pharo as well as I hope soom better
palettes.
Tx Damien for this code.
So we agree with alex that he can use it in Roassal the time that we
integrate it in Pharo :)
Stef
Le 16/12/14 22:43, Alexandre Bergel a écrit :
Hi!
Yesterday with Damien P., we had a great discussion about modeling
color palettes. Damien showed me an implementation he did about
cubehelix. This is a fantastic way to model colors, while preserving
the intensity. More info about it on:
https://www.mrao.cam.ac.uk/~dag/CUBEHELIX/
<https://www.mrao.cam.ac.uk/%7Edag/CUBEHELIX/>
Here is a code example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v helix shape elements slider |
v := RTView new.
helix := RTCubeHelix new.
helix rotations: 2.
helix gamma: 2.
shape := (RTBox new height: 300; width: 1; color: [ :model | helix
level: model ]).
elements := shape elementsOn: (0.0 to: 1.0 by: 0.002).
v addAll: elements.
RTHorizontalLineLayout new gapSize: 0; on: elements.
"Set the gamma value"
slider := RTSlider new.
slider view: v.
slider labelled.
slider callback: [ :aValue | helix gamma: 5 * aValue. elements
updateShape ].
slider moveBelow.
slider build.
"Set the rotation value"
slider := RTSlider new.
slider view: v.
slider labelled.
slider callback: [ :aValue | helix rotations: 5 * aValue. elements
updateShape ].
slider moveBelow.
slider build.
v
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
And the accompanying screenshot
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev