     palettesCollectionView.backgroundColor = .white
     palettesCollectionView.contentInset = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 0)
     view.addSubview(palettesCollectionView)
+    let rowWidth = view.bounds.width - cellSpacing * 2
+    let cellsPerRow = floor(rowWidth / (cellSize + cellSpacing))
+    let numberOfCells = CGFloat(colorSchemeConfigurations.count)
+    let numberOfRows = ceil(numberOfCells / cellsPerRow)
     view.addConstraint(NSLayoutConstraint(item: palettesCollectionView,
                                           attribute: .left,
                                           relatedBy: .equal,

                                    return createSchemeWithPalette(MDCPalette.orange)
    })
  ]

  private let cellSize : CGFloat = 33.0
  private let cellSpacing : CGFloat = 8.0

  override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {

 limitations under the License.
 */

import MDFTextAccessibility
import MaterialComponents.MaterialIcons_ic_check
import MaterialComponents.MaterialPalettes
import MaterialComponents.MaterialThemes
