Skip to content

Commit b24ab2e

Browse files
authored
minor oklab/oklch doc nitpicks (#12196)
# Objective Just some mild annoyances: - The `Color::Oklaba`, `Color::Oklcha` and `oklaba::Oklaba` doc comments were inconsistent with the others - The crate-level docs didn't include `Oklch` in the list of representations and misspelt it in a later paragraph ## Solution - Fix 'em
1 parent 58ee3e8 commit b24ab2e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

crates/bevy_color/src/color.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ pub enum Color {
2929
Laba(Laba),
3030
/// A color in the LCH color space with alpha.
3131
Lcha(Lcha),
32-
/// A color in the Oklaba color space with alpha.
32+
/// A color in the Oklab color space with alpha.
3333
Oklaba(Oklaba),
34-
/// A color in the Oklcha color space with alpha.
34+
/// A color in the Oklch color space with alpha.
3535
Oklcha(Oklcha),
3636
/// A color in the XYZ color space with alpha.
3737
Xyza(Xyza),

crates/bevy_color/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//! - [`Laba`] (lightness, a-axis, b-axis, alpha)
1111
//! - [`Lcha`] (lightness, chroma, hue, alpha)
1212
//! - [`Oklaba`] (lightness, a-axis, b-axis, alpha)
13+
//! - [`Oklcha`] (lightness, chroma, hue, alpha)
1314
//! - [`Xyza`] (x-axis, y-axis, z-axis, alpha)
1415
//!
1516
//! Each of these color spaces is represented as a distinct Rust type.
@@ -39,7 +40,7 @@
3940
//! and an analog of lightness in the form of value. In contrast, HWB instead uses whiteness and blackness
4041
//! parameters, which can be used to lighten and darken a particular hue respectively.
4142
//!
42-
//! Oklab and Okclch are perceptually uniform color spaces that are designed to be used for tasks such
43+
//! Oklab and Oklch are perceptually uniform color spaces that are designed to be used for tasks such
4344
//! as image processing. They are not as widely used as the other color spaces, but are useful
4445
//! for tasks such as color correction and image analysis, where it is important to be able
4546
//! to do things like change color saturation without causing hue shifts.

crates/bevy_color/src/oklaba.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::{
55
use bevy_reflect::{Reflect, ReflectDeserialize, ReflectSerialize};
66
use serde::{Deserialize, Serialize};
77

8-
/// Color in Oklaba color space, with alpha
8+
/// Color in Oklab color space, with alpha
99
#[doc = include_str!("../docs/conversion.md")]
1010
/// <div>
1111
#[doc = include_str!("../docs/diagrams/model_graph.svg")]

0 commit comments

Comments
 (0)