From 067e875f3f10441126c6a94d2e494c6ff9b0cf7a Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Mon, 12 Mar 2018 09:16:01 -0700 Subject: [PATCH] pango: Document ->color procedure. Pull string formats from Cairo. --- src/pango/pango.texi | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/pango/pango.texi b/src/pango/pango.texi index 1d513cb7e..88660bace 100644 --- a/src/pango/pango.texi +++ b/src/pango/pango.texi @@ -366,10 +366,24 @@ thereafter signal an error. @deffn Procedure pango-color-parse string Parses @var{string} and returns a floating-vector containing four flonums between 0. and 1. inclusive: the red, green, blue and alpha -components. @var{String} can be a standard color name (per the -Cascading Style Sheetse standard) or 1-4 hex digits specifying the -intensity of the red, green and blue components: @code{"#RGB"} or -@code{"#RRGGBB"} or @code{"#RRRGGGBBB"} or @code{"#RRRRGGGGBBBB"}. +components. @var{String} should be in one of the following formats. +@itemize +@item A standard color name (per the Cascading Style Sheets standard). +@item A hex value: 'RGB', 'RRGGBB', 'RRRGGGBBB', or 'RRRRGGGGBBBB'. +@item An RGB color: 'rgb(R,G,B)' where R, G and B are decimal +numbers between 0 and 255 inclusive or percentages. +@item An RGBA color: 'rgba(R,G,B,A)' where R, G and B are numbers or +percentages as above, and A is a floating point number between 0. and +1. inclusive. +@end itemize +@end deffn + +@anchor{->color} +@deffn Procedure ->color object operator +Returns a color, else signals @code{error:wrong-type-argument} with +@var{operator}. @var{Object} should be a color, symbol or string. +Symbols and strings are converted to colors by +@bref{pango-color-parse}. @end deffn @node GNU Free Documentation License, , API Reference, Top -- 2.25.1