Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4254544
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:05:54+00:00 2026-05-21T05:05:54+00:00

I want to make a gradient text with canvas and my pc renders the

  • 0

I want to make a gradient text with canvas and my pc renders the code correct, but android displays it like normal gradient with the text inside of it. How can i solve this problem, if it’s possible?
Here’s the javascript:

function text() {
var canvas = document.getElementById('header-text');
var ctx = canvas.getContext('2d');
var gradient = ctx.createLinearGradient(0, 0, 0, 29);
gradient.addColorStop(0, "#fcfcfc");
gradient.addColorStop(1, "#ccc");
ctx.font = "bold 29px helvetica, arial, sans-serif";
ctx.shadowColor = "#232323";
ctx.shadowOffsetX = 2;
ctx.shadowOffsetY = 2;
ctx.shadowBlur = 2;
ctx.fillStyle = gradient;
ctx.fillText("Company name", 0, 23);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T05:05:55+00:00Added an answer on May 21, 2026 at 5:05 am

    Sorry to say, it’s a bug.

    Or rather, the gradient for fillText is not yet implemented on the android browser. If you write this:

    var gradient = ctx.createLinearGradient(0, 0, 0, 29);
    gradient.addColorStop(0, "#fcfcfc");
    gradient.addColorStop(1, "#ccc");
    ctx.fillStyle = 'red';
    ctx.fillStyle = gradient; // replace the fillstyle with a gradient
    ctx.fillText("Testing", 0, 23);
    ctx.fillRect(0,0,20,20)
    

    You will see that both the text and the rectangle have the gradient in Chrome.

    See it live here.

    But on the android device the text will be red and the rect will be a gradient!

    Chrome itself still doesn’t have full support for all the canvas gradient cases that were laid out by the specification author (himself a Google employee). I submitted a bug report about it here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to make on/off gradient NSButton but with blue highlight like NSTabView select
I want to make an application that can generate point to point gradient (like
How can I make transparent gradient on my webpage like that on the picture?
Just like the question how can make it look glassy? I just want one
I want make interactive application where user launches it and can do various task
I am new android app developer i want make app for tablets and phone
I want my Spinner to have a black gradient background with white text on
Here is what I want to make, somehow: 1- A gradient background from top
I am trying to make custom button below is the code. I want to
So I would like to make the border faded. I have the exact webkit-gradient

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.