Skip to content

Commit

Permalink
Merge pull request AngleSharp#107 from sheshnathverma/devel
Browse files Browse the repository at this point in the history
Make color structure public
  • Loading branch information
FlorianRappl authored Feb 15, 2022
2 parents 1927eab + 1e7ff8d commit 15deaee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/AngleSharp.Css/Values/Primitives/Color.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace AngleSharp.Css.Values
/// Represents a color value.
/// </summary>
[StructLayout(LayoutKind.Explicit, Pack = 1, CharSet = CharSet.Unicode)]
struct Color : IEquatable<Color>, IComparable<Color>, ICssPrimitiveValue
public struct Color : IEquatable<Color>, IComparable<Color>, ICssPrimitiveValue
{
#region Basic colors

Expand Down Expand Up @@ -337,7 +337,7 @@ public static Color FromHwba(Double h, Double w, Double b, Double alpha)
var green = 0.0;
var blue = 0.0;

if (ratio < 1.0)
if (ratio < 1.0)
{
w *= ratio;
b *= ratio;
Expand All @@ -354,7 +354,7 @@ public static Color FromHwba(Double h, Double w, Double b, Double alpha)
var v = 1.0 - b;
var n = w + f * (v - w);

switch (p)
switch (p)
{
default:
case 6:
Expand Down

0 comments on commit 15deaee

Please sign in to comment.