class Pixie::Pixel
- Pixie::Pixel
- Reference
- Object
Defined in:
pixie/pixel.crConstant Summary
- 
        BLACK = Pixel.from_rgb(0, 0, 0)
- 
        BLUE = Pixel.from_rgb(0, 0, 255)
- 
        BROWN = Pixel.from_rgb(165, 42, 42)
- 
        COLOR_HEX_REGEX = /^#([A-Fa-f0-9]{9}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/
- 
        CYAN = Pixel.from_rgb(0, 255, 255)
- 
        GRAY = Pixel.from_rgb(128, 128, 128)
- 
        GREEN = Pixel.from_rgb(0, 255, 0)
- 
        MAGENTA = Pixel.from_rgb(255, 0, 255)
- 
        ORANGE = Pixel.from_rgb(255, 165, 0)
- 
        PINK = Pixel.from_rgb(255, 192, 203)
- 
        PURPLE = Pixel.from_rgb(128, 0, 128)
- 
        RED = Pixel.from_rgb(255, 0, 0)
- 
        TRANSPARENT = Pixel.from_rgb(0, 0, 0, 0)
- 
        WHITE = Pixel.from_rgb(255, 255, 255)
- 
        YELLOW = Pixel.from_rgb(255, 255, 0)
Constructors
Class Method Summary
- .from_cmyk(cyan : Int, magenta : Int, yellow : Int, key : Int)
- .from_hex(color : String)
- .from_rgb(red : Int, green : Int, blue : Int, alpha : Int = 1)
- .parse(string : String)
Instance Method Summary
- #<=>(other : Pixel)
- #==(other : Pixel)
- #alpha
- #alpha=(val : Float)
- #alpha_quantum
- #alpha_quantum=(val : Float)
- #black
- #black=(val : Float)
- #black_quantum
- #black_quantum=(val : Float)
- #blue
- #blue=(val : Float)
- #blue_quantum
- #blue_quantum=(val : Float)
- #clear
- #clone
- #cyan
- #cyan=(val : Float)
- #cyan_quantum
- #cyan_quantum=(val : Float)
- #fuzz
- #fuzz=(val : Float)
- #green
- #green=(val : Float)
- #green_quantum
- #green_quantum=(val : Float)
- #hsl
- #index
- #info
- 
        #inspect
        
          Returns an unambiguous and information-rich string representation of this object, typically intended for developers. 
- #magenta
- #magenta=(val : Float)
- #magenta_quantum
- #magenta_quantum=(val : Float)
- #normalized_string
- #quantum_packet
- #quantum_pixel(image : Image)
- #red
- #red=(val : Float)
- #red_quantum
- #red_quantum=(val : Float)
- #set_cmyk(cyan : Int, magenta : Int, yellow : Int, key : Int)
- #set_color(color : String)
- #set_hsl(hue : Int, saturation : Int, lightness : Int)
- #set_rgb(red : Int, green : Int, blue : Int, alpha : Int | Nil = nil)
- #similar?(other : Pixel, fuzz : Float)
- #size
- 
        #to_s
        
          Returns a nicely readable and concise string representation of this object, typically intended for users. 
- #to_unsafe : Pointer(LibMagick::PixelWand)
- #yellow
- #yellow=(val : Float)
- #yellow_quantum
- #yellow_quantum=(val : Float)
Macro Summary
Constructor Detail
Class Method Detail
Instance Method Detail
        
        def inspect
        #
      
      
        
              Description copied from class Object
            
          
          Returns an unambiguous and information-rich string representation of this object, typically intended for developers.
This method should usually not be overridden. It delegates to
#inspect(IO) which can be overridden for custom implementations.
Also see #to_s.
        
        def to_s
        #
      
      
        
              Description copied from class Object
            
          
          Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO) which can be overridden for custom implementations.
Also see #inspect.