Skip to content

Commit

Permalink
fix: ColorUtils.linearized() (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarthelery committed Mar 1, 2024
1 parent 6001a65 commit c82c363
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public object ColorUtils {
public fun linearized(rgbComponent: Int): Double {
val normalized = rgbComponent / 255.0
return if (normalized <= 0.040449936) normalized / 12.92 * 100.0
else (normalized + 0.055 / 1.055).pow(2.4) * 100.0
else ((normalized + 0.055) / 1.055).pow(2.4) * 100.0
}

/**
Expand Down

0 comments on commit c82c363

Please sign in to comment.