'Random' color AI script with no adjacent colors the same

New Here ,
Jan 04, 2021

Copy link to clipboard

Copied

Could an Illustrator script like RandomSwatchesFill be modified to apply colors in such a way that no two colors from a group of swatches would be repeated in shapes that immediately border each other? I don't think this is truly random, but it's meant to make the distribution of colors feel more varied.

 

From what I've seen online, this would be an application of the four color theorem — or whatever number of colors are involved. For my own purposes, I would typically have more colors in a group of swatches — at least five or more.

 

Appreciate any insights and guidance!

TOPICS
Draw and design, Feature request, How to, Scripting, Third party plugins

Views

72

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

'Random' color AI script with no adjacent colors the same

New Here ,
Jan 04, 2021

Copy link to clipboard

Copied

Could an Illustrator script like RandomSwatchesFill be modified to apply colors in such a way that no two colors from a group of swatches would be repeated in shapes that immediately border each other? I don't think this is truly random, but it's meant to make the distribution of colors feel more varied.

 

From what I've seen online, this would be an application of the four color theorem — or whatever number of colors are involved. For my own purposes, I would typically have more colors in a group of swatches — at least five or more.

 

Appreciate any insights and guidance!

TOPICS
Draw and design, Feature request, How to, Scripting, Third party plugins

Views

73

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 04, 2021 0
Engaged ,
Jan 06, 2021

Copy link to clipboard

Copied

Firstly, you'll need to define what "adjacent" means in terms of path items in Illustrator.  

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 06, 2021 0
New Here ,
Jan 09, 2021

Copy link to clipboard

Copied

By adjacent, I mean shapes that immediately border each other. In my case, the simplest example might be a checkerboard-like grid where colors are assigned so that no squares that border each other are colored the same. Thanks.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 09, 2021 0
Engaged ,
Jan 10, 2021

Copy link to clipboard

Copied

It could be done using an adjacency matrix, but this requires knowledge of graph theory, which unfortunately I do not presently possess. 

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 10, 2021 0
Resources