mcu-dislike 0.2.0

Detection and correction of universally disliked colors
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 18.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 170.5 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • 5ocworkshop

MCU Dislike

Detection and correction of universally disliked colors.

Color science studies indicate that certain dark yellow-green colors are consistently rated as unpleasant, correlated with biological waste and rotting food (Palmer and Schloss, 2010).

This module provides:

  • [DislikeAnalyzer::is_disliked] - Check if a color falls in the disliked range
  • [DislikeAnalyzer::fix_if_disliked] - Lighten disliked colors to make them acceptable

Example

use mcu_hct::Hct;
use mcu_dislike::DislikeAnalyzer;

let color = Hct::from(100.0, 50.0, 40.0); // Dark yellow-green
if DislikeAnalyzer::is_disliked(&color) {
    let fixed = DislikeAnalyzer::fix_if_disliked(&color);
    // fixed has tone 70, making it acceptable
}