From d372ac3be4b243ca731b33d643e3e8bf39980f78 Mon Sep 17 00:00:00 2001 From: Lucas Maximiliano Marino Date: Mon, 18 Dec 2023 23:36:17 +0100 Subject: [PATCH] docs: update documentation --- README.md | 9 ++++++++- src/lib.rs | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 60ee9f6..c2484c6 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,12 @@ Inspired by [RandomColor](https://github.com/davidmerfield/randomColor) by [davi Amazing rust projects using `random_color`: +> [fake-rs](https://github.com/cksac/fake-rs) — +> a library for generating fake data in Rust + +> [news-flash](https://github.com/patchedsoul/news-flash) — +> a modern feed reader designed for the GNOME desktop + > [cargo-trend](https://github.com/dalance/cargo-trend) — > cargo subcommand to generate trend graph of dependent crates @@ -35,6 +41,7 @@ Amazing rust projects using `random_color`: Check the online [documentation](https://docs.rs/random_color/latest/random_color/). ```rust +use random_color::color_dictionary::{ColorDictionary, ColorInformation}; use random_color::{Color, Luminosity, RandomColor}; let color = RandomColor::new() @@ -42,6 +49,7 @@ let color = RandomColor::new() .luminosity(Luminosity::Light) // Optional .seed(42) // Optional .alpha(1.0) // Optional + .dictionary(ColorDictionary::new()) //optional .to_hsl_string(); // // color => "hsl(179, 99%, 10%)" @@ -101,7 +109,6 @@ let color = RandomColor::new() ## Roadmap + Iteartor -+ Documentation ## License diff --git a/src/lib.rs b/src/lib.rs index 75d9e6a..6ea16b9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,7 @@ //! Inspired by [RandomColor](https://github.com/davidmerfield/randomColor). //! ### Usage //! ```rust +//! use random_color::color_dictionary::{ColorDictionary, ColorInformation}; //! use random_color::{Color, Luminosity, RandomColor}; //! //! let color = RandomColor::new() @@ -9,6 +10,7 @@ //! .luminosity(Luminosity::Light) // Optional //! .seed(42) // Optional //! .alpha(1.0) // Optional +//! .dictionary(ColorDictionary::new()) //! .to_hsl_string(); // //! //! // color => "hsl(179, 99%, 10%)"