Skip to content

Commit ff03762

Browse files
Display of CMYK values for the colors
1 parent 85ae37f commit ff03762

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

PantoneColorPicker/Models/CMYK.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ public CMYK DeepCopy()
5757

5858
public override string ToString()
5959
{
60-
return this.C.ToString() + "," + this.M.ToString() + ","
61-
+ this.Y.ToString() + "," + this.K.ToString();
60+
return "cmyk (" + C + ", " + M + ", " + Y + ", " + K + ")";
6261
}
6362
}
6463
}

PantoneColorPicker/Models/PantoneColor.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
using Newtonsoft.Json.Linq;
33
using System;
44
using System.Collections.Generic;
5-
using System.IO;
65
using System.Linq;
7-
using System.Text;
8-
using System.Threading.Tasks;
96

107
namespace PantoneColorPicker.Models
118
{
@@ -275,7 +272,7 @@ private static PantoneColor ParsePantoneColorJson(JToken json)
275272

276273
public override string ToString()
277274
{
278-
return this.Name.ToUpper() + ": " + this.RGB.ToString();
275+
return Name.ToUpper() + ": " + RGB + " / " + CMYK;
279276
}
280277
}
281278
}

PantoneColorPicker/Models/RGB.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public RGB DeepCopy()
5555

5656
public override string ToString()
5757
{
58-
return "R" + this.R.ToString() + ", G" + this.G.ToString() + ", B" + this.B.ToString();
58+
return "rgb (" + R + ", " + G + ", " + B + ")";
5959
}
6060
}
6161
}

0 commit comments

Comments
 (0)