maoruibin / maoruibin/maoruibin.github.com

根据两个颜色根据比例求过渡色

Open
#38 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

utils
Dominant language
HTML
Stars
22
Forks
4
PR merge metrics
No merged PRs in 30d

Description

    /**
     * get过度颜色
     *
     * @param color1
     * @param color2
     * @param p
     * @return
     */
    private static int getPaintColor(int color1, int color2, float p) {
        int r1 = (color1 & 0xff0000) >> 16;
        int g1 = (color1 & 0xff00) >> 8;
        int b1 = color1 & 0xff;
        int r2 = (color2 & 0xff0000) >> 16;
        int g2 = (color2 & 0xff00) >> 8;
        int b2 = color2 & 0xff;
        int r = (int) (r2 * p + r1 * (1 - p));
        int g = (int) (g2 * p + g1 * (1 - p));
        int b = (int) (b2 * p + b1 * (1 - p));
        return Color.argb(255, r, g, b);
    }

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.

Research direction

The issue provides a Java getPaintColor method but names no repository file, entry point, test, or expected change. First inspect the blog's source to determine where this color calculation belongs and clarify the intended behavior; done should include an agreed location and a way to verify the interpolated color result.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
web-dev
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.