Skip to content

Commit cbde760

Browse files
authored
SortHexColors v1.3
1 parent b0fd828 commit cbde760

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

SortHexColors/Form1.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,23 @@ private void Button1_Click(object sender, EventArgs e)
3434
// https://stackoverflow.com/a/62203405/8667430
3535
if (radioButton1.Checked)
3636
{
37-
tiledata.OrderBy(color => color.Item3.GetHue()).ThenBy(o => o.Item3.R * 3 + o.Item3.G * 2 + o.Item3.B * 1);
37+
// Create An IOrderEnumerable List
38+
var tiledatalist = tiledata.OrderBy(color => color.Item3.GetHue()).ThenBy(o => o.Item3.R * 3 + o.Item3.G * 2 + o.Item3.B * 1);
39+
40+
// Expand Each Item Of The List
41+
foreach (var tiledatainfo in tiledatalist)
42+
{
43+
// Define info from the list item
44+
string tile = tiledatainfo.Item1;
45+
string paint = tiledatainfo.Item2;
46+
Color color = tiledatainfo.Item3;
47+
48+
// Output the data
49+
richTextBox2.AppendText(tile + " " + paint + " " + ColorConverterExtensions.ToHexString(color).Replace("#", "") + Environment.NewLine);
50+
}
51+
52+
// End Sub
53+
return;
3854
}
3955

4056
// Sort colors based on HSV

0 commit comments

Comments
 (0)