Color

public struct Color
extension Color: Equatable
extension Color: CustomStringConvertible

Structure representing a color.

  • The red, green, blue, and alpha components of this Color`.

    Declaration

    Swift

    public let components: Components

Initializers

  • Create a Color with the given red, green, blue, and alpha values.

    Declaration

    Swift

    public init(red: Double, green: Double, blue: Double, alpha: Double = 1)
  • Create a Color with the given red, green, blue, and alpha values in the range [0,255].

    Declaration

    Swift

    public init(red: Int, green: Int, blue: Int, alpha: Double = 1)
  • Create a Color with the given cyan, yellow,mageneta,blackandalpha` values in the range [0,1].

    Declaration

    Swift

    public init(cyan: Double, magenta: Double, yellow: Double, black: Double, alpha: Double = 1)
  • Create a Color, with the given hue in the range of [0,360], the given saturation in the range of [0,1], the given value in the range of [0,1], and the given alpha in the range of [0,1].

    Declaration

    Swift

    public init(hue: Double, saturation: Double, value: Double, alpha: Double = 1)
  • Create a Color with the given white and alpha values.

    Declaration

    Swift

    public init(white: Double, alpha: Double = 1)
  • Create a Color with the given hex hexadecimal integer, and the alpha value.

    Declaration

    Swift

    public init(hex: Int, alpha: Double = 1)
  • Create a Color with the given hex string, and the given alpha value.

    Declaration

    Swift

    public init?(hex: String, alpha: Double)

Nested Types

  • The red, green, blue, and alpha components of this Color` in the range [0,1].

    See more

    Declaration

    Swift

    public struct Components
    extension Color.Components: Equatable
  • Undocumented

    Declaration

    Swift

    public static let aliceBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let antiqueWhite: Color
  • Undocumented

    Declaration

    Swift

    public static let aqua: Color
  • Undocumented

    Declaration

    Swift

    public static let aquamarine: Color
  • Undocumented

    Declaration

    Swift

    public static let azure: Color
  • Undocumented

    Declaration

    Swift

    public static let beige: Color
  • Undocumented

    Declaration

    Swift

    public static let bisque: Color
  • Undocumented

    Declaration

    Swift

    public static let black: Color
  • Undocumented

    Declaration

    Swift

    public static let blanchedAlmond: Color
  • Undocumented

    Declaration

    Swift

    public static let blue: Color
  • Undocumented

    Declaration

    Swift

    public static let blueViolet: Color
  • Undocumented

    Declaration

    Swift

    public static let brown: Color
  • Undocumented

    Declaration

    Swift

    public static let burlyWood: Color
  • Undocumented

    Declaration

    Swift

    public static let cadetBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let chartreuse: Color
  • Undocumented

    Declaration

    Swift

    public static let chocolate: Color
  • Undocumented

    Declaration

    Swift

    public static let coral: Color
  • Undocumented

    Declaration

    Swift

    public static let cornflowerBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let cornsilk: Color
  • Undocumented

    Declaration

    Swift

    public static let crimson: Color
  • Undocumented

    Declaration

    Swift

    public static let cyan: Color
  • Undocumented

    Declaration

    Swift

    public static let darkBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let darkCyan: Color
  • Undocumented

    Declaration

    Swift

    public static let darkGoldenRod: Color
  • Undocumented

    Declaration

    Swift

    public static let darkGray: Color
  • Undocumented

    Declaration

    Swift

    public static let darkGrey: Color
  • Undocumented

    Declaration

    Swift

    public static let darkGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let darkKhaki: Color
  • Undocumented

    Declaration

    Swift

    public static let darkMagenta: Color
  • Undocumented

    Declaration

    Swift

    public static let darkOliveGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let darkOrange: Color
  • Undocumented

    Declaration

    Swift

    public static let darkOrchid: Color
  • Undocumented

    Declaration

    Swift

    public static let darkRed: Color
  • Undocumented

    Declaration

    Swift

    public static let darkSalmon: Color
  • Undocumented

    Declaration

    Swift

    public static let darkSeaGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let darkSlateBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let darkSlateGray: Color
  • Undocumented

    Declaration

    Swift

    public static let darkSlateGrey: Color
  • Undocumented

    Declaration

    Swift

    public static let darkTurquoise: Color
  • Undocumented

    Declaration

    Swift

    public static let darkViolet: Color
  • Undocumented

    Declaration

    Swift

    public static let deepPink: Color
  • Undocumented

    Declaration

    Swift

    public static let deepSkyBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let dimGray: Color
  • Undocumented

    Declaration

    Swift

    public static let dimGrey: Color
  • Undocumented

    Declaration

    Swift

    public static let dodgerBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let fireBrick: Color
  • Undocumented

    Declaration

    Swift

    public static let floralWhite: Color
  • Undocumented

    Declaration

    Swift

    public static let forestGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let fuchsia: Color
  • Undocumented

    Declaration

    Swift

    public static let gainsboro: Color
  • Undocumented

    Declaration

    Swift

    public static let ghostWhite: Color
  • Undocumented

    Declaration

    Swift

    public static let gold: Color
  • Undocumented

    Declaration

    Swift

    public static let goldenRod: Color
  • Undocumented

    Declaration

    Swift

    public static let gray: Color
  • Undocumented

    Declaration

    Swift

    public static let grey: Color
  • Undocumented

    Declaration

    Swift

    public static let green: Color
  • Undocumented

    Declaration

    Swift

    public static let greenYellow: Color
  • Undocumented

    Declaration

    Swift

    public static let honeyDew: Color
  • Undocumented

    Declaration

    Swift

    public static let hotPink: Color
  • Undocumented

    Declaration

    Swift

    public static let indianRed: Color
  • Undocumented

    Declaration

    Swift

    public static let indigo: Color
  • Undocumented

    Declaration

    Swift

    public static let ivory: Color
  • Undocumented

    Declaration

    Swift

    public static let khaki: Color
  • Undocumented

    Declaration

    Swift

    public static let lavender: Color
  • Undocumented

    Declaration

    Swift

    public static let lavenderBlush: Color
  • Undocumented

    Declaration

    Swift

    public static let lawnGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let lemonChiffon: Color
  • Undocumented

    Declaration

    Swift

    public static let lightBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let lightCoral: Color
  • Undocumented

    Declaration

    Swift

    public static let lightCyan: Color
  • Undocumented

    Declaration

    Swift

    public static let lightGoldenRodYellow: Color
  • Undocumented

    Declaration

    Swift

    public static let lightGray: Color
  • Undocumented

    Declaration

    Swift

    public static let lightGrey: Color
  • Undocumented

    Declaration

    Swift

    public static let lightGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let lightPink: Color
  • Undocumented

    Declaration

    Swift

    public static let lightSalmon: Color
  • Undocumented

    Declaration

    Swift

    public static let lightSeaGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let lightSkyBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let lightSlateGray: Color
  • Undocumented

    Declaration

    Swift

    public static let lightSlateGrey: Color
  • Undocumented

    Declaration

    Swift

    public static let lightSteelBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let lightYellow: Color
  • Undocumented

    Declaration

    Swift

    public static let lime: Color
  • Undocumented

    Declaration

    Swift

    public static let limeGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let linen: Color
  • Undocumented

    Declaration

    Swift

    public static let magenta: Color
  • Undocumented

    Declaration

    Swift

    public static let maroon: Color
  • Undocumented

    Declaration

    Swift

    public static let mediumAquaMarine: Color
  • Undocumented

    Declaration

    Swift

    public static let mediumBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let mediumOrchid: Color
  • Undocumented

    Declaration

    Swift

    public static let mediumPurple: Color
  • Undocumented

    Declaration

    Swift

    public static let mediumSeaGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let mediumSlateBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let mediumSpringGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let mediumTurquoise: Color
  • Undocumented

    Declaration

    Swift

    public static let mediumVioletRed: Color
  • Undocumented

    Declaration

    Swift

    public static let midnightBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let mintCream: Color
  • Undocumented

    Declaration

    Swift

    public static let mistyRose: Color
  • Undocumented

    Declaration

    Swift

    public static let moccasin: Color
  • Undocumented

    Declaration

    Swift

    public static let navajoWhite: Color
  • Undocumented

    Declaration

    Swift

    public static let navy: Color
  • Undocumented

    Declaration

    Swift

    public static let oldLace: Color
  • Undocumented

    Declaration

    Swift

    public static let olive: Color
  • Undocumented

    Declaration

    Swift

    public static let oliveDrab: Color
  • Undocumented

    Declaration

    Swift

    public static let orange: Color
  • Undocumented

    Declaration

    Swift

    public static let orangeRed: Color
  • Undocumented

    Declaration

    Swift

    public static let orchid: Color
  • Undocumented

    Declaration

    Swift

    public static let paleGoldenRod: Color
  • Undocumented

    Declaration

    Swift

    public static let paleGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let paleTurquoise: Color
  • Undocumented

    Declaration

    Swift

    public static let paleVioletRed: Color
  • Undocumented

    Declaration

    Swift

    public static let papayaWhip: Color
  • Undocumented

    Declaration

    Swift

    public static let peachPuff: Color
  • Undocumented

    Declaration

    Swift

    public static let peru: Color
  • Undocumented

    Declaration

    Swift

    public static let pink: Color
  • Undocumented

    Declaration

    Swift

    public static let plum: Color
  • Undocumented

    Declaration

    Swift

    public static let powderBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let purple: Color
  • red

    Undocumented

    Declaration

    Swift

    public static let red: Color
  • Undocumented

    Declaration

    Swift

    public static let rosyBrown: Color
  • Undocumented

    Declaration

    Swift

    public static let royalBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let saddleBrown: Color
  • Undocumented

    Declaration

    Swift

    public static let salmon: Color
  • Undocumented

    Declaration

    Swift

    public static let sandyBrown: Color
  • Undocumented

    Declaration

    Swift

    public static let seaGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let seaShell: Color
  • Undocumented

    Declaration

    Swift

    public static let sienna: Color
  • Undocumented

    Declaration

    Swift

    public static let silver: Color
  • Undocumented

    Declaration

    Swift

    public static let skyBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let slateBlue: Color
  • Undocumented

    Declaration

    Swift

    public static let slateGray: Color
  • Undocumented

    Declaration

    Swift

    public static let slateGrey: Color
  • Undocumented

    Declaration

    Swift

    public static let snow: Color
  • Undocumented

    Declaration

    Swift

    public static let springGreen: Color
  • Undocumented

    Declaration

    Swift

    public static let steelBlue: Color
  • tan

    Undocumented

    Declaration

    Swift

    public static let tan: Color
  • Undocumented

    Declaration

    Swift

    public static let teal: Color
  • Undocumented

    Declaration

    Swift

    public static let thistle: Color
  • Undocumented

    Declaration

    Swift

    public static let tomato: Color
  • Undocumented

    Declaration

    Swift

    public static let turquoise: Color
  • Undocumented

    Declaration

    Swift

    public static let violet: Color
  • Undocumented

    Declaration

    Swift

    public static let wheat: Color
  • Undocumented

    Declaration

    Swift

    public static let white: Color
  • Undocumented

    Declaration

    Swift

    public static let whiteSmoke: Color
  • Undocumented

    Declaration

    Swift

    public static let yellow: Color
  • Undocumented

    Declaration

    Swift

    public static let yellowGreen: Color
  • Declaration

    Swift

    public var description: String { get }