Skip to content

Commit a69a04f

Browse files
feat: add RGB/HSV color conversion (#995)
1 parent 324ab51 commit a69a04f

File tree

3 files changed

+436
-0
lines changed

3 files changed

+436
-0
lines changed

DIRECTORY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
* [Octal to Hexadecimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/octal_to_hexadecimal.rs)
8484
* [Order of Magnitude Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/order_of_magnitude_conversion.rs)
8585
* [RGB-CMYK Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/rgb_cmyk_conversion.rs)
86+
* [RGB-HSV Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/rgb_hsv_conversion.rs)
8687
* [Roman Numerals](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/roman_numerals.rs)
8788
* [Time Units](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/time_units.rs)
8889
* Data Structures

src/conversions/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ mod octal_to_decimal;
1313
mod octal_to_hexadecimal;
1414
mod order_of_magnitude_conversion;
1515
mod rgb_cmyk_conversion;
16+
mod rgb_hsv_conversion;
1617
mod roman_numerals;
1718
mod time_units;
1819

@@ -33,5 +34,6 @@ pub use self::order_of_magnitude_conversion::{
3334
convert_metric_length, metric_length_conversion, MetricLengthUnit,
3435
};
3536
pub use self::rgb_cmyk_conversion::rgb_to_cmyk;
37+
pub use self::rgb_hsv_conversion::{hsv_to_rgb, rgb_to_hsv, ColorError, Hsv, Rgb};
3638
pub use self::roman_numerals::{int_to_roman, roman_to_int};
3739
pub use self::time_units::convert_time;

0 commit comments

Comments
 (0)