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 8292261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:24:56+00:00 2026-06-08T13:24:56+00:00

I have a table view with 17 sections with 4 rows each. I want

  • 0

I have a table view with 17 sections with 4 rows each. I want to set random different colors for each section in such a way that the colors dont repeat, and every time the table is reloaded their respective colors change. For example: If a table header has Gray color, then its cells should have different shades of gray.. and.. If a table header has green color, then its cells should have different shades of green, and so on.
How to do this
thankx in advance

  • 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-06-08T13:24:58+00:00Added an answer on June 8, 2026 at 1:24 pm

    So the solution to this is to use a color space that uses hue, saturation, and luminance. The hue is either 360 degrees or 2 radians. If you need colors, you start splitting the circle into the number of slices you need, create the value in that color space (the hue from the slice, set saturation to full on, luminance to full on. In your case its 360/17 is your slice degree.

    We used this at a company I worked at a few years ago. There is probably sample C code around for this but you’ll have to search on your own to try and find it. Its not that hard to do.

    Apple has a nice guide on color and color spaces, you can read it in the Xcode documentation pane by searching on “Color and Color Spaces”.

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

Sidebar

Related Questions

I have a grouped table view that contains 3 sections and each row per
I have an table view with 4 sections and 1 row in each section.Is
I have 2 sections within a table view and I have loaded one section
So I have 3 sections with 3 rows in each section (9 rows overall),
I have a table with n sections. Each section contains one row. How to
I have a table view with three sections. The first section contains custom cells
I have a tableview with four sections first section has 7 rows in that
I have table View with grouped style with three sections. Get information from dictionary
When I have a table view with some sections which have their own headers
I have a tableview, which has many sections. each section has just one cell.

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.