Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Colour Gradient Generator] Complete rewrite + new features #559

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,18 @@
},
"colour_gradient_generator": {
"title": "Colour Gradient Generator",
"icon": "gradient",
"icon": "icon.png",
"author": "Ewan Howell",
"description": "Generate hue shifted gradient palettes from a single colour.",
"about": "This plugin generates hue shifted colour gradient palettes from a single colour.\n## Example\nInput colour\n<img width=\"64\" height=\"64\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEXBTTPNEJHzAAAACklEQVR4XmNgAAAAAgAB3p6PvwAAAABJRU5ErkJggg==\">\nOutput gradient\n<img width=\"576\" height=\"64\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAABBAMAAAD+7JlOAAAAG1BMVEUnChZNFCR0HymaLSnBTTPTgFferoHp0qv07dW2MQ6TAAAADklEQVR4XmNgVHZNbwAAArQBUTtjBIoAAAAASUVORK5CYII=\">\n## How to use\nTo use this plugin, go into paint mode and change the colour palette mode to <strong>Palette</strong> or **Both**.\nYou can then select a colour and click on the gradient icon to generate a colour gradient.",
"tags": ["Paint", "Palette", "Color"],
"version": "1.2.0",
"min_version": "4.2.0",
"variant": "both"
"version": "2.0.0",
"min_version": "4.10.0",
"variant": "both",
"website": "https://ewanhowell.com/plugins/colour-gradient-generator/",
"repository": "https://github.com/ewanhowell5195/blockbenchPlugins/tree/main/colour_gradient_generator",
"bug_tracker": "https://github.com/ewanhowell5195/blockbenchPlugins/issues?title=[Colour Gradient Generator]",
"creation_date": "2022-06-02",
"has_changelog": true
},
"collapsible_start_screen_categories": {
"title": "Collapsible Start Screen Categories",
Expand Down
270 changes: 0 additions & 270 deletions plugins/colour_gradient_generator.js

This file was deleted.

105 changes: 105 additions & 0 deletions plugins/colour_gradient_generator/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<div id="about-content">
<p>This plugin generates hue shifted colour gradient palettes from a single colour.</p>
<h2>Example</h2>
<h3>Input Colour</h3>
<div class="about-colour-gradient">
<div style="background-color: #C14D34;"></div>
<div></div>
</div>
<h3>Output Gradient Palette</h3>
<div class="about-colour-gradient">
<div style="background-color: #260A11;"></div>
<div style="background-color: #4D151C;"></div>
<div style="background-color: #741F21;"></div>
<div style="background-color: #9A312A;"></div>
<div style="background-color: #C14D34;"></div>
<div style="background-color: #D27A58;"></div>
<div style="background-color: #DDA482;"></div>
<div style="background-color: #E9C9AB;"></div>
<div style="background-color: #F4E7D5;"></div>
</div>
<h2>How to use</h2>
<p>To use this plugin, go into paint mode and change the colour palette mode to <strong>Palette</strong> or <strong>Both</strong>. You can then select the <strong>Generate Colour Gradient</strong> button <i class="icon material-icons" style="translate:0 5px;">gradient</i> to start creating your gradient palette.</p>
</div>
<style>
.about {
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
#about-content {
overflow-y: auto;
min-height: 128px;
}
.about-colour-gradient {
display: flex;
filter: drop-shadow(0 3px 10px #0006);
padding: 0 20px;
}
.about-colour-gradient > div {
flex: 1;
aspect-ratio: 1;
position: relative;
}
.about-colour-gradient > div:nth-child(2):last-child {
flex: 8;
aspect-ratio: 0;
}
.about-colour-gradient > div:nth-child(5)::before {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: -8px;
height: 4px;
background-color: var(--color-accent);
}
#about-markdown-links {
display: flex;
justify-content: space-around;
margin: 20px 20px 0;
}
#about-markdown-links > a {
display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
padding: 5px;
text-decoration: none;
flex-grow: 1;
flex-basis: 0;
color: var(--color-subtle_text);
text-align: center;
}
#about-markdown-links > a:hover {
background-color: var(--color-accent);
color: var(--color-light);
}
#about-markdown-links > a > i {
font-size: 32px;
width: 100%;
max-width: initial;
height: 32px;
text-align: center;
}
#about-markdown-links > a:hover > i {
color: var(--color-light) !important;
}
#about-markdown-links > a > p {
flex: 1;
display: flex;
align-items: center;
margin: 0;
}
</style>
<div id="about-markdown-links">
<a href="https://ewanhowell.com/">
<i class="material-icons icon" style="color: rgb(51, 227, 142);">language</i>
<p>By Ewan Howell</p>
</a>
<a href="https://discord.ewanhowell.com/">
<i class="fa_big icon fab fa-discord" style="color: rgb(114, 127, 255);"></i>
<p>Discord Server</p>
</a>
</div>
76 changes: 76 additions & 0 deletions plugins/colour_gradient_generator/changelog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"1.0.0": {
"title": "1.0.0",
"date": "2022-06-02",
"author": "Ewan Howell",
"categories": [
{
"title": "New Features",
"list": [
"Initial release"
]
}
]
},
"1.0.1": {
"title": "1.0.1",
"date": "2022-06-05",
"author": "Ewan Howell",
"categories": [
{
"title": "Changes",
"list": [
"Updated the plugin about"
]
}
]
},
"1.1.0": {
"title": "1.1.0",
"date": "2022-10-22",
"author": "Ewan Howell",
"categories": [
{
"title": "Technical Changes",
"list": [
"Stored data is now removed when uninstalling the plugin"
]
}
]
},
"1.2.0": {
"title": "1.2.0",
"date": "2023-01-19",
"author": "Ewan Howell",
"categories": [
{
"title": "Technical Changes",
"list": [
"Updated for Blockbench 4.6"
]
}
]
},
"2.0.0": {
"title": "2.0.0",
"date": "2024-06-13",
"author": "Ewan Howell",
"categories": [
{
"title": "New Features",
"list": [
"Added a live colour palette preview",
"Added a new \"Brightness Range\" slider",
"Added a new \"Colour Offset\" slider",
"Added a toggle to limit the ranges to smaller ones, making it easier to be more precise"
]
},
{
"title": "Technical Changes",
"list": [
"Rewritten from the ground up"
]
}
]
}
}
Loading
Loading