Skip to content

Conversation

@JohnTasler
Copy link
Contributor

@JohnTasler JohnTasler commented Jan 20, 2022

Make it look more like a Color value:
# 7F 80 80 40

@sylveon
Copy link
Contributor

sylveon commented Jan 20, 2022

Why not use an hex RGBA color format? Something like #8080407f

Also what if one if the value fits in a single digit? Do you get 0 or 00?

@kennykerr
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Scottj1s
Copy link
Member

Why not use an hex RGBA color format? Something like #8080407f

Also what if one if the value fits in a single digit? Do you get 0 or 00?

agree - can we just remove the spaces?

@Scottj1s
Copy link
Member

Great addition - thanks!

@sylveon
Copy link
Contributor

sylveon commented Jan 20, 2022

This is funny, I was suggesting putting alpha at the end, as CSS uses that (#RRGGBBAA). But then I noticed that XAML uses #AARRGGBB, so keeping alpha at the front makes more sense in this context.

</Type>
<!--Primitive type visualizers-->
<Type Name="winrt::Windows::UI::Color">
<DisplayString># {A,nvoXb} {R,nvoXb} {G,nvoXb} {B,nvoXb}</DisplayString>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the spaces and confirm that leading zeroes are emitted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish there was a "half-space" character. I added the spaces so it would be easier to see each byte. I will confirm the single-digit case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the spaces and confirmed that, yes, byte values less than 0x10 have the leading zero added.

@kennykerr
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kennykerr kennykerr merged commit 1ccfe2e into microsoft:master Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants