File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 1111//! Color::rgb(0x1111, 0xaaaa, 0xffff)
1212//! );
1313//! ```
14+
1415use core:: fmt;
1516use std:: error;
1617use std:: marker:: PhantomData ;
@@ -47,12 +48,15 @@ impl Color {
4748 /// Parses the subset of X11 [Color Strings](https://www.x.org/releases/current/doc/libX11/libX11/libX11.html#Color_Strings)
4849 /// emitted by terminals in response to `OSC` color queries (`OSC 10`, `OSC 11`, ...).
4950 ///
51+ /// This function is a rough analogue to `XParseColor`.
52+ ///
5053 /// ## Accepted Formats
5154 /// * `#<red><green><blue>`
5255 /// * `rgb:<red>/<green>/<blue>`
5356 /// * `rgba:<red>/<green>/<blue>/<alpha>` (rxvt-unicode extension)
5457 ///
5558 /// where `<red>`, `<green>` and `<blue>` are hexadecimal numbers with 1-4 digits.
59+ #[ doc( alias = "XParseColor" ) ]
5660 pub fn parse ( input : & [ u8 ] ) -> Result < Color , ColorParseError > {
5761 xparsecolor ( input) . ok_or ( ColorParseError ( PhantomData ) )
5862 }
You can’t perform that action at this time.
0 commit comments