WebKitColor: WPE Reference Manual

## WebKitColor WebKitColor — A boxed type representing a RGBA color |

## Functions

gboolean | webkit_color_parse ()

## Types and Values

#define | WEBKIT_TYPE_COLOR
| WebKitColor

## Object Hierarchy

        GBoxed
        ╰── WebKitColor

## Description

A WebKitColor is a boxed type representing a RGBA color.

## Functions

### webkit_color_parse ()

    gboolean
    webkit_color_parse (WebKitColor *color,
                        const gchar *color_string);

Create a new WebKitColor for the given `color_string` representation. There are two valid representation types: standard color names (see https://htmlcolorcodes.com/color-names/ for instance) or HEX values.

#### Parameters

color | a WebKitColor to fill in |
color_string | color representation as color nickname or HEX string |

#### Returns

a gboolean indicating if the `color` was correctly filled in or not.

Since: 2.24

## Types and Values

### WEBKIT_TYPE_COLOR

    #define WEBKIT_TYPE_COLOR (webkit_color_get_type())

### WebKitColor

    typedef struct {
        gdouble red;
        gdouble green;
        gdouble blue;
        gdouble alpha;
    } WebKitColor;

A WebKitColor is a boxed type representing a RGBA color.

#### Members

gdouble `red`; | Red channel, between 0.0 and 1.0 inclusive |
gdouble `green`; | Green channel, between 0.0 and 1.0 inclusive |
gdouble `blue`; | Blue channel, between 0.0 and 1.0 inclusive |
gdouble `alpha`; | Alpha channel, between 0.0 and 1.0 inclusive |

Since: 2.24

## See Also

WebKitWebView.