Skip to content

[fix-finder] Add XML documentation to named Color properties in Android.Graphics.Color #12170

Description

@github-actions

Problem

The predefined named Color static properties in src/Mono.Android/Android.Graphics/Color.cs (e.g. Color.Red, Color.DarkSlateGray, Color.Violet) ship in the public Mono.Android.dll but have no /// XML documentation. Developers consuming these convenience colors get no IntelliSense/summary, and the build can emit CS1591 for undocumented public members.

Location

  • File(s): src/Mono.Android/Android.Graphics/Color.cs
  • Line(s): the block of named-color static properties, approximately lines 278-418 (Transparent through YellowGreen)

Current Code

public static Color Transparent { get { return new Color (0x000000); } }
public static Color AliceBlue { get { return new Color (0xFFF0F8FF); } }
// ...
public static Color Violet { get { return new Color (0xFFEE82EE); } }
public static Color White { get { return new Color (0xFFFFFFFF); } }
public static Color YellowGreen { get { return new Color (0xFF9ACD32); } }

Suggested Fix

Add a concise <summary> to each named-color property describing the color and its ARGB value. For example:

/// <summary>Gets a <see cref="Color" /> with the ARGB value #FFEE82EE (violet).</summary>
public static Color Violet { get { return new Color (0xFFEE82EE); } }

/// <summary>Gets a fully transparent <see cref="Color" /> (ARGB #00000000).</summary>
public static Color Transparent { get { return new Color (0x000000); } }

Apply the same pattern to every named-color property in that block. Keep summaries one line and mention the hex ARGB value shown in the existing code.

Guidelines

  • This is purely additive documentation — do not change any runtime values or behavior.
  • Follow dotnet/android formatting: tabs for indentation, space before (.
  • Use <see cref="Color" /> where referencing the type.
  • Only modify the named-color property block; do not touch other members or the ColorValueMarshaler.

Acceptance Criteria

  • Every named-color static property in the block has a one-line <summary> XML doc comment.
  • The stated ARGB hex value in each summary matches the value in the property body.
  • No runtime code or values changed.
  • All tests pass.
  • No new warnings introduced.

Fix-finder metadata

  • Script: 04-missing-xml-docs
  • Score: 26/30 (actionability: 10, safety: 10, scope: 6)

Generated by Nightly Fix Finder · 54.2 AIC · ⌖ 19.8 AIC · ⊞ 9.4K ·

  • expires on Jul 25, 2026, 2:25 AM UTC

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions