Commit Graph

24 Commits

Author SHA1 Message Date
Gustas
64b2bd4735 Update to HTTPS 2024-06-03 10:25:06 +02:00
RoosterDragon
5f97e2de5a Make Color use uint for ARGB.
This is a more natural representation than int that allows removal of casts in many places that require uint. Additionally, we can change the internal representation from long to uint, making the Color struct smaller. Since arrays of colors are common, this can save on memory.
2024-03-09 21:10:02 +02:00
RoosterDragon
360f24f609 Fix IDE0055
This rule no longer appears to be buggy, so enforce it. Some of the automated fixes are adjusted in order to improve the result. #pragma directives have no option to control indentation, so remove them where possible.
2023-11-16 08:45:10 +02:00
RoosterDragon
eb287d9b8d Fix RCS1089 2023-11-10 10:38:41 +02:00
Rudy Alex Kohn
7769764b0b added new method to convert byte array to lower case hex-string
added unit test

update ToHex(byte[]) to support mono

added punctuations to unit test summary and parameter description

Replaced with Convert.ToHexString(), public ToHex() + use from Color.ToString()

Adjusted back to a simpler mono compatible version only, with lowered allocation
2023-09-23 10:14:44 +03:00
RoosterDragon
d83e579dfe Fix CA1305 2023-08-07 21:38:09 +02:00
RoosterDragon
6362bbd176 Fix CA1846 2023-04-17 00:05:12 +02:00
RoosterDragon
164abfdae1 Fix IDE0083 2023-04-08 16:51:51 +03:00
RoosterDragon
023d80b94d Fix IDE0057 2023-04-08 16:51:51 +03:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
abcdefg30
a9cd2d41c7 Fix ToAhsv using the wrong type for alpha 2022-01-29 13:44:02 +01:00
Paul Chote
bc51461427 Make sure the hue returned by Color.RgbToHsv is positive. 2021-07-03 12:18:25 -05:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
Paul Chote
57d955ec72 Change Color.ToAhsv to tuple syntax. 2021-05-15 15:29:46 +02:00
Paul Chote
560f1a6466 Restrict player color choices to the hue-saturation plane. 2021-05-15 15:29:46 +02:00
teinarss
6b74093c04 Add readonly to structs 2021-03-14 15:17:57 +01:00
teinarss
4a1e4f3e16 Use expression body syntax 2021-03-07 13:00:52 +00:00
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
RoosterDragon
6c9fbd40dc Implement IEquatable on structs.
Any struct which overrides object.Equals(object obj) should implement IEquatable<T> to gain a more efficient Equals(T other) overload. This overload will be used by hashing collections like Dictionary which enables them to check equality without boxing the struct.
2019-09-15 19:56:58 +02:00
Paul Chote
ebd36891dc Switch other struct types to default(T). 2019-06-08 13:19:57 +02:00
Paul Chote
d70055c38d Add int channel version of Color.FromAhsl. 2019-03-12 12:41:06 +01:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00