Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jord1e committed Oct 23, 2019
1 parent 3109ab6 commit 4afb409
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# VBA-Golden-Ratio
# VBA Golden Ratio
Excel equidistant background coloring using the golden ratio and VBA.

![Macro Output](./vba_golden_ratio_result.png)

## Usage
To use this file, call the `ColorUniqueCellsUsingGoldenRatio` subroutine with a [`Range`](https://docs.microsoft.com/en-us/office/vba/api/Excel.Range(object)) argument.

```vba
Dim selection As range
Set selection = Application.selection
ColorUniqueCellsUsingGoldenRatio selection ' or: Call ColorUniqueCellsUsingGoldenRatio(selection)
```

## Citations
* https://gamedev.stackexchange.com/questions/46463/how-can-i-find-an-optimum-set-of-colors-for-10-players
* https://stackoverflow.com/questions/3018313/algorithm-to-convert-rgb-to-hsv-and-hsv-to-rgb-in-range-0-255-for-both
* https://www.howtobuildsoftware.com/index.php/how-do/cr3z/vba-ms-access-double-modulus-mod-with-doubles

0 comments on commit 4afb409

Please sign in to comment.