UIColor(HBAdditions)

@interface UIColor (HBAdditions)

UIColor (HBAdditions) is a class category in Cephei that provides some convenience methods.

  • Creates and returns a color object using data from the specified object.

    The value is expected to either be an array of 3 or 4 integer RGB or RGBA color components (respectively), with values between 0 and 255, or a CSS hexadecimal color code string.

    Declaration

    Objective-C

    + (nonnull instancetype)hb_colorWithPropertyListValue:(nonnull id)value;

    Swift

    class func hb_color(withPropertyListValue value: Any) -> Self

    Parameters

    value

    The object to retrieve data from. See the discussion for the supported object types. @returns The color object. The color information represented by this object is in the device RGB colorspace.

  • Initializes and returns a color object using data from the specified object.

    The value is expected to either be an array of 3 or 4 integer RGB or RGBA color components (respectively), with values between 0 and 255, or a CSS hexadecimal color code string.

    Declaration

    Objective-C

    - (nonnull instancetype)hb_initWithPropertyListValue:(nonnull id)value;

    Swift

    func hb_init(withPropertyListValue value: Any) -> Self

    Parameters

    value

    The object to retrieve data from. See the discussion for the supported object types. @returns An initialized color object. The color information represented by this object is in the device RGB colorspace.