MCPcopy Index your code
hub / github.com/elementh/random_color

github.com/elementh/random_color @v1.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.0 ↗ · + Follow
69 symbols 261 edges 6 files 36 documented · 52%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

random_color crate badge

Rust crate for generating attractive random colors. Check it out on crates.io.

Inspired by RandomColor by davidmerfield.

Using the library

Check the online documentation.

License

The MIT License (MIT)

Copyright (c) 2017-2024 Lucas Maximiliano Marino

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Extension points exported contracts — how you extend this code

Seed (Interface)
A trait for types that can be used as seeds for the RandomColor struct. [7 implementers]
src/options/seed.rs

Core symbols most depended-on inside this repo

luminosity
called by 19
src/lib.rs
seed
called by 19
src/lib.rs
hue
called by 18
src/lib.rs
alpha
called by 18
src/lib.rs
random_within
called by 12
src/lib.rs
generate_color
called by 11
src/lib.rs
hsv_to_rgb
called by 7
src/lib.rs
has_between_range
called by 7
src/color_dictionary.rs

Shape

Method 44
Function 19
Class 3
Enum 2
Interface 1

Languages

Rust100%

Modules by API surface

src/lib.rs56 symbols
src/color_dictionary.rs9 symbols
src/options/seed.rs2 symbols
src/options/luminosity.rs1 symbols
src/options/gamut.rs1 symbols

For agents

$ claude mcp add random_color \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact