Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add implicit cast from floatN/halfN to UnityEngine.Color and back

Open
#105 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp, unity
Domain
game-dev

Research direction

Start by locating the vector types named in the request, including floatN and halfN, and the UnityEngine.Color conversion entry points. Determine which color-to-vector and vector-to-color conversions are intended, then verify that the implicit casts cover the requested types in both directions. The issue does not name files or tests, so the relevant definitions and validation coverage must be found in the repository.

Written by the indexing model from the issue text.

Description

It would be nice to be able to implicitly cast from a color to a vector and back.
Currently I'm using an extension method like this, but I it would be nicer to just cast from one to the other.

public static class Extensions
{
public static float3 ToFloat3(this Color c)
{
return new float3(c.r, c.b, c.b);
}
}

Dominant language
C#
Stars
1.4k
Forks
159
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Unity-Technologies/Unity.Mathematics

All issues in Unity-Technologies/Unity.Mathematics

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.