Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 30 lines (21 sloc) 0.751 kb
b09763d Clean up colors
Slava Pestov authored
1 ! Copyright (C) 2003, 2009 Slava Pestov.
1ef5dbe Move hsva to colors.hsv
Slava Pestov authored
2 ! Copyright (C) 2008 Eduardo Cavazos.
a96457c Initial import
Slava Pestov authored
3 ! See http://factorcode.org/license.txt for BSD license.
93afebd colors: add an opaque? word and a transparent color
Slava Pestov authored
4 USING: kernel accessors combinators math ;
a96457c Initial import
Slava Pestov authored
5 IN: colors
6
e9e1313 colors: Add color tuples
Eduardo Cavazos authored
7 TUPLE: color ;
8
91d0c4e Fix conflict
Slava Pestov authored
9 TUPLE: rgba < color
10 { red read-only }
11 { green read-only }
12 { blue read-only }
13 { alpha read-only } ;
e9e1313 colors: Add color tuples
Eduardo Cavazos authored
14
1ef5dbe Move hsva to colors.hsv
Slava Pestov authored
15 C: <rgba> rgba
e9e1313 colors: Add color tuples
Eduardo Cavazos authored
16
6906fad Fixing help-lint issues
Slava Pestov authored
17 GENERIC: >rgba ( color -- rgba )
e9e1313 colors: Add color tuples
Eduardo Cavazos authored
18
463b3ff colors: use old style methods
Eduardo Cavazos authored
19 M: rgba >rgba ( rgba -- rgba ) ;
e9e1313 colors: Add color tuples
Eduardo Cavazos authored
20
6906fad Fixing help-lint issues
Slava Pestov authored
21 M: color red>> ( color -- red ) >rgba red>> ;
ba61e15 colors: minor change
Eduardo Cavazos authored
22 M: color green>> ( color -- green ) >rgba green>> ;
6906fad Fixing help-lint issues
Slava Pestov authored
23 M: color blue>> ( color -- blue ) >rgba blue>> ;
e9e1313 colors: Add color tuples
Eduardo Cavazos authored
24
2a7d353 Debugging Core Text, get colored text working and fix memory management ...
Slava Pestov authored
25 : >rgba-components ( object -- r g b a )
26 >rgba { [ red>> ] [ green>> ] [ blue>> ] [ alpha>> ] } cleave ; inline
27
93afebd colors: add an opaque? word and a transparent color
Slava Pestov authored
28 : opaque? ( color -- ? ) alpha>> 1 number= ;
29
1483178 Update various vocabularies for colors.constants
Slava Pestov authored
30 CONSTANT: transparent T{ rgba f 0.0 0.0 0.0 0.0 }
Something went wrong with that request. Please try again.